diff options
author | Min RK <benjaminrk@gmail.com> | 2016-07-29 10:09:43 +0200 |
---|---|---|
committer | Min RK <benjaminrk@gmail.com> | 2016-07-29 10:09:43 +0200 |
commit | ca9749b3c9b6ec565686347db0e47cd272a4c524 (patch) | |
tree | 2afc307d6b5b4846084300d7ad28930f92b87b85 | |
parent | 7cb842e1e81cbff7e1a0e04a46e1da96113f9a15 (diff) | |
download | external_python_setuptools-ca9749b3c9b6ec565686347db0e47cd272a4c524.tar.gz external_python_setuptools-ca9749b3c9b6ec565686347db0e47cd272a4c524.tar.bz2 external_python_setuptools-ca9749b3c9b6ec565686347db0e47cd272a4c524.zip |
fix NameError when initial working_set is empty
by defining dist so there's something to delete
-rw-r--r-- | pkg_resources/__init__.py | 1 |
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 |