SVN: Zope/branches/2.13/src/OFS/Traversable.py Move NullResource to normal module scope import

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.cvs
Message-ID <20110820162156.6530B941EC__5442.51213218576$1313857333$gmane$org@cvs.zope.org>
Log message for revision 122634:
  Move NullResource to normal module scope import
  

Changed:
  U   Zope/branches/2.13/src/OFS/Traversable.py

-=-
Modified: Zope/branches/2.13/src/OFS/Traversable.py
===================================================================
--- Zope/branches/2.13/src/OFS/Traversable.py	2011-08-20 16:11:34 UTC (rev 122633)
+++ Zope/branches/2.13/src/OFS/Traversable.py	2011-08-20 16:21:56 UTC (rev 122634)
@@ -27,6 +27,7 @@
 from Acquisition import aq_parent
 from Acquisition.interfaces import IAcquirer
 from OFS.interfaces import ITraversable
+from webdav.NullResource import NullResource
 from zExceptions import NotFound
 from ZPublisher.interfaces import UseTraversalDefault
 from ZODB.POSException import ConflictError
@@ -39,7 +40,6 @@
 from zope.traversing.namespace import nsParse
 
 _marker = object()
-NullResource = None
 
 
 class Traversable:
@@ -254,10 +254,6 @@
                                     # The item lookup may return a NullResource,
                                     # if this is the case we save it and return it
                                     # if all other lookups fail.
-                                    global NullResource
-                                    if NullResource is None:
-                                        from webdav.NullResource import NullResource
-
                                     if isinstance(next, NullResource):
                                         resource = next
                                         raise KeyError(name)

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.