We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c6a2a commit cecc47aCopy full SHA for cecc47a
sc2reader/utils.py
@@ -688,7 +688,7 @@ def read_header(replay_file):
688
# Sanity check that the input is in fact an MPQ file
689
if buffer.empty or buffer.read_hex(4).upper() != "4D50511B":
690
msg = "File '{}' is not an MPQ file";
691
- raise exceptions.FileError(msg.format(replay_file.name))
+ raise exceptions.FileError(msg.format(getattr(replay_file, 'name', '<NOT AVAILABLE>')))
692
693
max_data_size = buffer.read_int(LITTLE_ENDIAN)
694
header_offset = buffer.read_int(LITTLE_ENDIAN)
0 commit comments