Features: ;

Fixes: 1) Fix indentation issue in handling zip file stream for proper file processing;

Extra: ;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-05-16 02:05:02 +03:00
parent 97b877c943
commit ec4fa17d72

View file

@ -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