We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 041f24c commit 9dfd9ecCopy full SHA for 9dfd9ec
1 file changed
packtools/sps/pid_provider/xml_sps_lib.py
@@ -126,8 +126,8 @@ def get_xml_items_from_zip_file(
126
-----
127
Yields errors as dicts instead of raising. Check for 'error' key.
128
"""
129
- filenames = None
130
- basenames = None
+ filenames = []
+ basenames = []
131
try:
132
with ZipFile(xml_sps_file_path) as zf:
133
zip_files = zf.namelist()
@@ -137,7 +137,7 @@ def get_xml_items_from_zip_file(
137
if not xml_files:
138
raise TypeError(f"{xml_sps_file_path} has no XML files")
139
140
- basenames = (os.path.basename(n) for n in zip_files if n)
+ basenames = list(os.path.basename(n) for n in zip_files if n)
141
for xml_file in xml_files:
142
143
xml_with_pre = get_xml_with_pre(zf.read(xml_file).decode("utf-8"))
0 commit comments