Skip to content

Commit 9666837

Browse files
committed
Small update
1 parent f0bba42 commit 9666837

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pyfoxfile/pyfoxfile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,8 +2151,11 @@ def CheckCompressionSubType(infile, formatspecs=__file_format_multi_dict__, file
21512151
if(prefp == binascii.unhexlify("7061785f676c6f62616c")):
21522152
filetype = "tarfile"
21532153
fp.seek(curloc, 0)
2154-
if(hasattr(precfp, "read")):
2155-
precfp.close()
2154+
try:
2155+
if(hasattr(precfp, "read")):
2156+
precfp.close()
2157+
except NameError:
2158+
pass
21562159
if(closefp):
21572160
fp.close()
21582161
return filetype

0 commit comments

Comments
 (0)