@@ -66,31 +66,31 @@ def main():
6666 print ("" )
6767 print (path )
6868 print ('{build} - {real_type} on {map_name} - Played {start_time}' .format (** e .replay .__dict__ ))
69- print ('[ERROR]' , e . message )
69+ print ('[ERROR] {} ' , e )
7070 for event in e .game_events [- 5 :]:
7171 print ('{0} - {1}' .format (hex (event .type ), event .bytes .encode ('hex' )))
72- print (e .buffer .read_range (e .location , e .location + 50 ).encode ('hex' ))
72+ print (e .buffer .read_range (e .location , e .location + 50 ).encode ('hex' ))
7373 print
7474 except Exception as e :
7575 print ("" )
7676 print (path )
7777 try :
7878 replay = sc2reader .load_replay (path , debug = True , load_level = 2 )
7979 print ('{build} - {real_type} on {map_name} - Played {start_time}' .format (** replay .__dict__ ))
80- print ('[ERROR] {0}' .format (e . message ))
80+ print ('[ERROR] {0}' .format (e ))
8181 for pid , attributes in replay .attributes .items ():
8282 print ("{0} {1}" .format (pid , attributes ))
83- for pid , info in enumerate (replay .raw_data [ 'replay.details' ]. players ):
83+ for pid , info in enumerate (replay .players ):
8484 print ("{0} {1}" .format (pid , info ))
85- for message in replay .raw_data [ 'replay.message.events' ]. messages :
85+ for message in replay .messages :
8686 print ("{0} {1}" .format (message .pid , message .text ))
8787 traceback .print_exc ()
8888 print ("" )
8989 except Exception as e2 :
9090 replay = sc2reader .load_replay (path , debug = True , load_level = 0 )
9191 print ('Total failure parsing {release_string}' .format (** replay .__dict__ ))
92- print ('[ERROR] {0}' .format (e . message ))
93- print ('[ERROR] {0}' .format (e2 . message ))
92+ print ('[ERROR] {0}' .format (e ))
93+ print ('[ERROR] {0}' .format (e2 ))
9494 traceback .print_exc ()
9595 print
9696
0 commit comments