Features: ;
Fixes: 1) Fix indentation issue in handling zip file stream for proper file processing; Extra: ;
This commit is contained in:
parent
97b877c943
commit
ec4fa17d72
1 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue