Skip to content

Commit 91a72cd

Browse files
committed
Small update
1 parent 8c1f541 commit 91a72cd

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

pyfoxfile/pyfile.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7924,29 +7924,29 @@ def PackFoxFileFromInFile(infile, outfile, fmttype="auto", compression="auto", c
79247924
def FoxFileArrayValidate(infile, verbose=False):
79257925
# ---------- Input handling ----------
79267926
if isinstance(infile, dict):
7927-
listarrayfiles = [infile]
7927+
listarrayfileslist = [infile]
79287928
elif isinstance(infile, list):
7929-
listarrayfiles = infile
7929+
listarrayfileslist = infile
79307930
else:
79317931
if (infile != "-" and not isinstance(infile, (bytes, bytearray, memoryview)) # bytes is str on Py2
79327932
and not hasattr(infile, "read") and not hasattr(infile, "write")):
79337933
infile = RemoveWindowsPath(infile)
7934-
listarrayfiles = ArchiveFileToArray(
7934+
listarrayfileslist = ArchiveFileToArray(
79357935
infile, fmttype, filestart, 0, 0,
79367936
False, True, False, True, formatspecs, saltkey, seektoend, returnfp
79377937
)
7938-
if not isinstance(listarrayfiles, dict):
7939-
if verbose: logging.warning("listarrayfiles must be a dict, got %r", type(listarrayfiles))
7940-
return False
7941-
for key in ("ffilelist", "fnumfiles"):
7942-
if key not in listarrayfiles:
7943-
if verbose: logging.warning("Missing top-level key: %s", key)
7944-
return False
7945-
if not isinstance(listarrayfiles["ffilelist"], list):
7946-
if verbose: logging.warning("ffilelist must be a list, got %r", type(listarrayfiles["ffilelist"]))
7947-
return False
79487938

79497939
for listarrayfiles in listarrayfileslist:
7940+
if not isinstance(listarrayfiles, dict):
7941+
if verbose: logging.warning("listarrayfiles must be a dict, got %r", type(listarrayfiles))
7942+
return False
7943+
for key in ("ffilelist", "fnumfiles"):
7944+
if key not in listarrayfiles:
7945+
if verbose: logging.warning("Missing top-level key: %s", key)
7946+
return False
7947+
if not isinstance(listarrayfiles["ffilelist"], list):
7948+
if verbose: logging.warning("ffilelist must be a list, got %r", type(listarrayfiles["ffilelist"]))
7949+
return False
79507950
# Per-entry required keys
79517951
required = [
79527952
"fname", "fencoding", "fheadersize", "fsize", "flinkname",

0 commit comments

Comments
 (0)