Commit f783aa36 authored by Jason R. Coombs's avatar Jason R. Coombs

Use generator expression to manage the scope of 'dist'

parent 24e0c488
......@@ -3038,10 +3038,10 @@ 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:
tuple(
dist.activate(replace=False)
del dist
for dist in working_set
)
add_activation_listener(lambda dist: dist.activate(replace=True), existing=False)
working_set.entries = []
# match order
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment