[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Traversing - __init__.py:1.11

Steve Alexander steve@cat-box.net
Thu, 5 Dec 2002 08:46:02 -0500


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

Modified Files:
	__init__.py 
Log Message:
Removed the requirement that objects are always context wrapped for 
discovering their physical paths. This doesn't apply for the root object,
for example, and might also not apply for objects that supply a different
PhysicallyLocatable adapter that doesn't depend on context wrappers.


=== Zope3/lib/python/Zope/App/Traversing/__init__.py 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/Traversing/__init__.py:1.10	Tue Nov 26 14:00:21 2002
+++ Zope3/lib/python/Zope/App/Traversing/__init__.py	Thu Dec  5 08:45:59 2002
@@ -88,8 +88,6 @@
     
     Raises TypeError if the given object is not context wrapped
     """
-    if not _isWrapper(obj):
-        raise TypeError, "Not enough context information to traverse"
     iterator = _WrapperChain(obj)
     iterator.next()  # send head of chain (current object) to /dev/null
     return [p for p in iterator]
@@ -99,9 +97,6 @@
     
     Raises TypeError if the given object is not context wrapped
     """
-    if not _isWrapper(obj):
-        raise TypeError, "Not enough context information to traverse"
-    
     return _getAdapter(obj, _IPhysicallyLocatable).getPhysicalPath()
 
 def getPhysicalPathString(obj):
@@ -109,9 +104,6 @@
     
     Raises TypeError if the given object is not context wrapped
     """
-    if not _isWrapper(obj):
-        raise TypeError, "Not enough context information to traverse"
-    
     path = _getAdapter(obj, _IPhysicallyLocatable).getPhysicalPath()
     return locationAsUnicode(path)