[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Traversing - Traverser.py:1.1.2.5

Jim Fulton jim@zope.com
Tue, 12 Feb 2002 18:06:28 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Traversing
In directory cvs.zope.org:/tmp/cvs-serv21714

Modified Files:
      Tag: Zope-3x-branch
	Traverser.py 
Log Message:
Added support for unicode paths.


=== Zope3/lib/python/Zope/App/Traversing/Traverser.py 1.1.2.4 => 1.1.2.5 ===
 from Zope.App.Security.SecurityManagement import getSecurityManager
 
-from types import StringType
+from types import StringType, UnicodeType
 
 from __future__ import generators
 
@@ -56,7 +56,7 @@
     def unrestrictedTraverse(self, path, default=_marker, restricted=0):
         if not path: return self._wrapper
 
-        if type(path) is StringType:
+        if type(path) in (StringType, UnicodeType):
             path = path.split('/')
             if len(path) > 1 and not path[-1]:
                 # Remove trailing slash