Restore Python 2.6 compatibility

c70525bb84 broke Python 2.6 compatibility
by using a dict comprehension, which is a Python 2.7 feature. I replaced
it with calling dict with a generator expression, which looks almost as
good and it works in Python 2.6.
This commit is contained in:
Marc Abramowitz 2014-06-17 23:00:42 -07:00
parent c70525bb84
commit fd0c477192
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ def venv_fixture(pickle_file):
"""
with open(pickle_file, 'rb') as f:
pkgs = pickle.load(f)
pkg_index = {p.key: p for p in pkgs}
req_map = {p: p.requires() for p in pkgs}
pkg_index = dict((p.key, p) for p in pkgs)
req_map = dict((p, p.requires()) for p in pkgs)
return pkgs, pkg_index, req_map