summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-30 11:28:04 -0400
committerGitHub <noreply@github.com>2016-07-30 11:28:04 -0400
commit0ea8d2665f444460c69f2f480179871cf67bee99 (patch)
tree9928ebf3b0d7dca87e519369f378f087488a2a84
parent39912c7e8c5160a9805ca5f55ff671ffe2e521cb (diff)
parentca9749b3c9b6ec565686347db0e47cd272a4c524 (diff)
downloadpython-setuptools-git-0ea8d2665f444460c69f2f480179871cf67bee99.tar.gz
Merge pull request #703 from minrk/del-dist
fix NameError when initial working_set is empty
-rw-r--r--pkg_resources/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 6d472734..9f0ea6ec 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2981,6 +2981,7 @@ def _initialize_master_working_set():
# ensure that all distributions added to the working set in the future
# (e.g. by calling ``require()``) will get activated as well,
# with higher priority (replace=True).
+ dist = None # ensure dist is defined for del dist below
for dist in working_set:
dist.activate(replace=False)
del dist