Skip to content

Commit b781d56

Browse files
committed
Fixed memory leak in Geonames
1 parent 9b56281 commit b781d56

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cities_light/geonames.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ def extract(self, zip_path, file_name):
6767

6868
zip_file = zipfile.ZipFile(zip_path)
6969
if zip_file:
70-
with open(destination, 'wb') as destination_file:
71-
destination_file.write(zip_file.read(file_name))
70+
zip_file.extract(file_name, DATA_DIR)
7271

7372
def parse(self):
7473
file = open(self.file_path, 'r')

0 commit comments

Comments
 (0)