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 9ab6210 commit 6e5f593Copy full SHA for 6e5f593
sc2reader/utils.py
@@ -629,8 +629,8 @@ def read_header(replay_file):
629
630
#Sanity check that the input is in fact an MPQ file
631
if buffer.empty or buffer.read_hex(4).upper() != "4D50511B":
632
- msg = "File '{0}' is not an MPQ file";
633
- raise exceptions.FileError(msg.format(replay_file.name))
+ msg = "File '{}' is not an MPQ file";
+ raise exceptions.FileError(msg.format(getattr(replay_file, 'name', '<NOT AVAILABLE>')))
634
635
max_data_size = buffer.read_int(LITTLE_ENDIAN)
636
header_offset = buffer.read_int(LITTLE_ENDIAN)
0 commit comments