Skip to content

Commit 9dfd9ec

Browse files
Voltar a ser lista para não haver problema com serialização (#1014)
1 parent 041f24c commit 9dfd9ec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packtools/sps/pid_provider/xml_sps_lib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def get_xml_items_from_zip_file(
126126
-----
127127
Yields errors as dicts instead of raising. Check for 'error' key.
128128
"""
129-
filenames = None
130-
basenames = None
129+
filenames = []
130+
basenames = []
131131
try:
132132
with ZipFile(xml_sps_file_path) as zf:
133133
zip_files = zf.namelist()
@@ -137,7 +137,7 @@ def get_xml_items_from_zip_file(
137137
if not xml_files:
138138
raise TypeError(f"{xml_sps_file_path} has no XML files")
139139

140-
basenames = (os.path.basename(n) for n in zip_files if n)
140+
basenames = list(os.path.basename(n) for n in zip_files if n)
141141
for xml_file in xml_files:
142142
try:
143143
xml_with_pre = get_xml_with_pre(zf.read(xml_file).decode("utf-8"))

0 commit comments

Comments
 (0)