Skip to content

Commit

Permalink
Silence unclosed file warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nidico committed Sep 14, 2014
1 parent ea564e5 commit 300a1c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/z3c/checkversions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ def __init__(self,
self.incremental = incremental
if blacklist:
# create a set of tuples with bad versions
self.blacklist = set([tuple(map(lambda x: x.strip(), line.split('=')))
for line in open(blacklist).readlines() if '=' in line])
with open(blacklist) as b:
self.blacklist = set([
tuple(map(lambda x: x.strip(), line.split('=')))
for line in b.readlines()
if '=' in line
])
else:
self.blacklist = set()
self.pi = package_index.PackageIndex(search_path=())
Expand Down

0 comments on commit 300a1c9

Please sign in to comment.