Skip to content

Commit

Permalink
read of closed file fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubd committed Jan 4, 2018
1 parent f788bc1 commit f5d0cf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions harpoon/commands/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def update(self):
for this_fn in tar.getmembers():
if this_fn.name.endswith("GeoLite2-ASN.mmdb"):
mmdb = tar.extractfile(this_fn)
with open(self.geoasn, 'wb+') as f:
f.write(mmdb.read())
mmdb.close()
with open(self.geoasn, 'wb+') as f:
f.write(mmdb.read())
mmdb.close()
print("-GeoLite2-ASN.mmdb")
print("Download ASN Name database")
try:
Expand Down

0 comments on commit f5d0cf5

Please sign in to comment.