File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def hobeta_help(*parsed_args):
41
41
" F - The first occupied sector or just padding?\n "
42
42
" C - File size in TR-DOS sectors\n "
43
43
" CHK - Checksum of this header (excluding CHK)" )
44
+ return parsed_args
44
45
45
46
46
47
def calc_checksum (data ):
@@ -157,7 +158,7 @@ def parse_args(args):
157
158
options = parser .parse_args (args )
158
159
if len (args ) == 0 :
159
160
raise ValueError
160
- except :
161
+ except ValueError :
161
162
parser .print_help ()
162
163
sys .exit (0 )
163
164
Original file line number Diff line number Diff line change 20
20
21
21
22
22
def show_info (* parsed_args ):
23
- return
23
+ return parsed_args
24
24
25
25
26
26
def read_file (src_file ):
@@ -59,6 +59,8 @@ def convert_file(parsed_args):
59
59
tab = False
60
60
output = parsed_args .output_file
61
61
strnum = 0
62
+ cur_buffer = ""
63
+ cur_line = io .StringIO ()
62
64
for b in read_file (parsed_args .zeus_file ):
63
65
if process_string :
64
66
cur_buffer += "0x%02X " % b
@@ -87,7 +89,7 @@ def convert_file(parsed_args):
87
89
print (ASM_META [b - ASM_FIRST_TOKEN ], end = "" , file = cur_line )
88
90
except IndexError :
89
91
logger .warning ("Token not defined: 0x%02X (%d), at line %05d. "
90
- "Skipped." % ( b , b , strnum ) )
92
+ "Skipped." , b , b , strnum )
91
93
else :
92
94
if not strnum_lo [0 ]:
93
95
strnum_lo = True , b
@@ -139,7 +141,7 @@ def parse_args(args):
139
141
options = parser .parse_args (args )
140
142
if len (args ) == 0 :
141
143
raise ValueError
142
- except :
144
+ except ValueError :
143
145
parser .print_help ()
144
146
sys .exit (0 )
145
147
You can’t perform that action at this time.
0 commit comments