diff --git a/geo/management/commands/cities.py b/geo/management/commands/cities.py index 7793ea7a..67158dab 100644 --- a/geo/management/commands/cities.py +++ b/geo/management/commands/cities.py @@ -214,18 +214,18 @@ class Command(BaseCommand): filepath = os.path.join(self.data_dir, filename) with zipfile.ZipFile(str(filepath)).open(name + ".txt", "r") as f: zip_member = f - file_obj = io.TextIOWrapper(zip_member, encoding="utf-8") + file_obj = io.TextIOWrapper(zip_member, encoding="utf-8") - for row in file_obj: - if not row.startswith("#"): - yield dict( - list( - zip( - settings.files[filekey]["fields"], - row.rstrip("\n").split("\t"), + for row in file_obj: + if not row.startswith("#"): + yield dict( + list( + zip( + settings.files[filekey]["fields"], + row.rstrip("\n").split("\t"), + ) ) ) - ) else: with open(os.path.join(self.data_dir, filename), encoding="utf-8") as f: file_obj = f