Module: deluge
Branch: master
Commit: f17634ea638853bc7405f8c104edcb03fa0ac413

Author: Pedro Algarvio <[email protected]>
Date:   Thu Dec  9 22:18:59 2010 +0000

Drop pkutil and simply use pkg_resources.

---

 deluge/__init__.py                                |    8 ++------
 deluge/plugins/AutoAdd/deluge/__init__.py         |    8 ++------
 deluge/plugins/AutoAdd/deluge/plugins/__init__.py |    8 ++------
 deluge/plugins/__init__.py                        |    9 ++-------
 4 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/deluge/__init__.py b/deluge/__init__.py
index bb62714..fe92cd1 100644
--- a/deluge/__init__.py
+++ b/deluge/__init__.py
@@ -1,8 +1,4 @@
 """Deluge"""
 # this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
diff --git a/deluge/plugins/AutoAdd/deluge/__init__.py 
b/deluge/plugins/AutoAdd/deluge/__init__.py
index 2e2033b..94033e8 100644
--- a/deluge/plugins/AutoAdd/deluge/__init__.py
+++ b/deluge/plugins/AutoAdd/deluge/__init__.py
@@ -1,7 +1,3 @@
 # this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
diff --git a/deluge/plugins/AutoAdd/deluge/plugins/__init__.py 
b/deluge/plugins/AutoAdd/deluge/plugins/__init__.py
index 2e2033b..94033e8 100644
--- a/deluge/plugins/AutoAdd/deluge/plugins/__init__.py
+++ b/deluge/plugins/AutoAdd/deluge/plugins/__init__.py
@@ -1,7 +1,3 @@
 # this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
diff --git a/deluge/plugins/__init__.py b/deluge/plugins/__init__.py
index bf99a9d..94033e8 100644
--- a/deluge/plugins/__init__.py
+++ b/deluge/plugins/__init__.py
@@ -1,8 +1,3 @@
 # this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
-
+import pkg_resources
+pkg_resources.declare_namespace(__name__)

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to