summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-12-01 05:21:03 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-12-01 05:21:03 -0500
commitf9bfe4d3011feff382adfbd8ee87a3701e03ce28 (patch)
tree03d9a4ce4a6206c565c8d6f0ddbde30217e1aa86 /pkg_resources.py
parentbf9c84eadae80290a5cd2cadd2c9b5b5e456e546 (diff)
downloadpython-setuptools-git-f9bfe4d3011feff382adfbd8ee87a3701e03ce28.tar.gz
Modernize syntax
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index be8c6c57..3334bdfa 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1891,14 +1891,17 @@ def _handle_ns(packageName, path_item):
module = sys.modules.get(packageName)
if module is None:
module = sys.modules[packageName] = imp.new_module(packageName)
- module.__path__ = []; _set_parent_ns(packageName)
+ module.__path__ = []
+ _set_parent_ns(packageName)
elif not hasattr(module,'__path__'):
raise TypeError("Not a package:", packageName)
handler = _find_adapter(_namespace_handlers, importer)
subpath = handler(importer,path_item,packageName,module)
if subpath is not None:
- path = module.__path__; path.append(subpath)
- loader.load_module(packageName); module.__path__ = path
+ path = module.__path__
+ path.append(subpath)
+ loader.load_module(packageName)
+ module.__path__ = path
return subpath
def declare_namespace(packageName):
@@ -2409,7 +2412,6 @@ class Distribution(object):
bdir = os.path.dirname(nloc)
npath= [(p and _normalize_cached(p) or p) for p in path]
- bp = None
for p, item in enumerate(npath):
if item==nloc:
break