[Zope3-checkins] SVN: Zope3/branches/ajung-target-requestpublication-next-try-branch/src/zope/app/publication/metaconfigure.py reorganized registry creation

Tarek Ziadé tziade at nuxeo.com
Sat Oct 8 05:20:14 EDT 2005


Log message for revision 38924:
  reorganized registry creation

Changed:
  U   Zope3/branches/ajung-target-requestpublication-next-try-branch/src/zope/app/publication/metaconfigure.py

-=-
Modified: Zope3/branches/ajung-target-requestpublication-next-try-branch/src/zope/app/publication/metaconfigure.py
===================================================================
--- Zope3/branches/ajung-target-requestpublication-next-try-branch/src/zope/app/publication/metaconfigure.py	2005-10-08 09:16:06 UTC (rev 38923)
+++ Zope3/branches/ajung-target-requestpublication-next-try-branch/src/zope/app/publication/metaconfigure.py	2005-10-08 09:20:14 UTC (rev 38924)
@@ -46,7 +46,7 @@
         """
         def _cleanElement(element):
             element = element.strip()
-            if element == u'':
+            if element == u'' or element is None:
                 return u'*'
             return element
 
@@ -67,12 +67,10 @@
 _factory_registerer = None
 
 def getFactoryRegistry():
-    return _factory_registerer
-
-def publisher(_context, name, factory, method='*', mimetype='*', priority=0):
-
     global _factory_registerer
     if _factory_registerer is None:
         _factory_registerer = RequestPublicationRegistry()
+    return _factory_registerer
 
+def publisher(_context, name, factory, method='*', mimetype='*', priority=0):
     RequestPublicationRegisterer(name, factory(), method, mimetype, priority)



More information about the Zope3-Checkins mailing list