Skip to content

Commit

Permalink
Merge pull request #703 from minrk/del-dist
Browse files Browse the repository at this point in the history
fix NameError when initial working_set is empty
  • Loading branch information
jaraco authored Jul 30, 2016
2 parents 39912c7 + ca9749b commit 0ea8d26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ea8d26

Please sign in to comment.