[Checkins] [zopefoundation/zope.traversing] 2c7af3: Gracefully handle UnicodeEncodeError on python 2.

GitHub noreply at github.com
Thu Aug 4 14:31:33 CEST 2016


  Branch: refs/heads/handle-unicode-gracefully
  Home:   https://github.com/zopefoundation/zope.traversing
  Commit: 2c7af36ae6217a02e614d8af14ca06a20b7147b1
      https://github.com/zopefoundation/zope.traversing/commit/2c7af36ae6217a02e614d8af14ca06a20b7147b1
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2016-08-04 (Thu, 04 Aug 2016)

  Changed paths:
    M CHANGES.rst
    M src/zope/traversing/adapters.py
    M src/zope/traversing/tests/test_conveniencefunctions.py
    M src/zope/traversing/tests/test_traverser.py

  Log Message:
  -----------
  Gracefully handle UnicodeEncodeError on python 2.

This can be produced when doing an attribute lookup. Turn it into a
LocationError (or the default value).

zope.container.traversal.ContainerTraversable was doing this already,
see https://github.com/zopefoundation/zope.container/blob/master/src/zope/container/traversal.py#L105




More information about the checkins mailing list