[z3-checkins] r32456 - z3/hurry.query/trunk/src/hurry

faassen at codespeak.net faassen at codespeak.net
Mon Sep 18 17:57:56 CEST 2006


Author: faassen
Date: Mon Sep 18 17:57:51 2006
New Revision: 32456

Modified:
   z3/hurry.query/trunk/src/hurry/__init__.py
Log:
Improve namespace package registration.


Modified: z3/hurry.query/trunk/src/hurry/__init__.py
==============================================================================
--- z3/hurry.query/trunk/src/hurry/__init__.py	(original)
+++ z3/hurry.query/trunk/src/hurry/__init__.py	Mon Sep 18 17:57:51 2006
@@ -1,5 +1,7 @@
 # this is a namespace package
 try:
-    __import__('pkg_resources').declare_namespace(__name__)
+    import pkg_resources
+    pkg_resources.declare_namespace(__name__)
 except ImportError:
-    pass
+    import pkgutil
+    __path__ = pkgutil.extend_path(__path__, __name__)


More information about the z3-checkins mailing list