@@ -102,7 +102,7 @@ def read_byte(self):
102102
103103 def read_short (self , endian = LITTLE_ENDIAN ):
104104 #if self.bytes_left() < 2:
105- # raise EOFError("Cannot read short; only {} bytes left in buffer".format(self.left))
105+ # raise EOFError("Cannot read short; only {0 } bytes left in buffer".format(self.left))
106106
107107 if self .bit_shift == 0 :
108108 return struct .unpack (endian + 'H' , self .read (2 ))[0 ]
@@ -119,7 +119,7 @@ def read_short(self, endian=LITTLE_ENDIAN):
119119
120120 def read_int (self , endian = LITTLE_ENDIAN ):
121121 #if self.bytes_left() < 4:
122- # raise EOFError("Cannot read int; only {} bytes left in buffer".format(self.left))
122+ # raise EOFError("Cannot read int; only {0 } bytes left in buffer".format(self.left))
123123
124124 if self .bit_shift == 0 :
125125 return struct .unpack (endian + 'I' , self .read (4 ))[0 ]
@@ -136,7 +136,7 @@ def read_int(self, endian=LITTLE_ENDIAN):
136136
137137 def read_bits (self , bits ):
138138 #if self.bytes_left()*8 < bits-(8-self.bit_shift):
139- # raise EOFError("Cannot read {} bits. only {} bits left in buffer.".format(bits, (self.length-self.tell()+1)*8-self.bit_shift))
139+ # raise EOFError("Cannot read {0 } bits. only {1 } bits left in buffer.".format(bits, (self.length-self.tell()+1)*8-self.bit_shift))
140140 bit_shift = self .bit_shift
141141 if bit_shift != 0 :
142142 bits_left = 8 - bit_shift
@@ -188,7 +188,7 @@ def read_bits(self, bits):
188188
189189 def read_bytes (self , bytes ):
190190 #if self.bytes_left() < bytes:
191- # raise EOFError("Cannot read {} bytes. only {} bytes left in buffer.".format(bytes, self.length-self.tell()))
191+ # raise EOFError("Cannot read {0 } bytes. only {1 } bytes left in buffer.".format(bytes, self.length-self.tell()))
192192
193193 if self .bit_shift == 0 :
194194 return self .read (bytes )
@@ -470,7 +470,7 @@ def extract_data_file(data_file, archive):
470470
471471 except Exception as e :
472472 trace = sys .exc_info ()[2 ]
473- raise exceptions .MPQError ("Unable to extract file: {}" .format (data_file ),e ), None , trace
473+ raise exceptions .MPQError ("Unable to extract file: {0 }" .format (data_file ),e ), None , trace
474474
475475def read_header (replay_file ):
476476 # Extract useful header information from the MPQ files. This information
@@ -481,7 +481,7 @@ def read_header(replay_file):
481481
482482 # Sanity check that the input is in fact an MPQ file
483483 if data .length == 0 or data .read (4 ) != "MPQ\x1b " :
484- msg = "File '{}' is not an MPQ file" ;
484+ msg = "File '{0 }' is not an MPQ file" ;
485485 raise exceptions .FileError (msg .format (getattr (replay_file , 'name' , '<NOT AVAILABLE>' )))
486486
487487 max_data_size = data .read_int (LITTLE_ENDIAN )
0 commit comments