Skip to content

Commit 211e1de

Browse files
author
Kirill V. Lyadvinsky
committed
Fix landscape warnings & errors
1 parent 977c9d4 commit 211e1de

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

zxtools/hobeta.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def hobeta_help(*parsed_args):
4141
" F - The first occupied sector or just padding?\n"
4242
" C - File size in TR-DOS sectors\n"
4343
" CHK - Checksum of this header (excluding CHK)")
44+
return parsed_args
4445

4546

4647
def calc_checksum(data):
@@ -157,7 +158,7 @@ def parse_args(args):
157158
options = parser.parse_args(args)
158159
if len(args) == 0:
159160
raise ValueError
160-
except:
161+
except ValueError:
161162
parser.print_help()
162163
sys.exit(0)
163164

zxtools/zeus2txt.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def show_info(*parsed_args):
23-
return
23+
return parsed_args
2424

2525

2626
def read_file(src_file):
@@ -59,6 +59,8 @@ def convert_file(parsed_args):
5959
tab = False
6060
output = parsed_args.output_file
6161
strnum = 0
62+
cur_buffer = ""
63+
cur_line = io.StringIO()
6264
for b in read_file(parsed_args.zeus_file):
6365
if process_string:
6466
cur_buffer += "0x%02X " % b
@@ -87,7 +89,7 @@ def convert_file(parsed_args):
8789
print(ASM_META[b-ASM_FIRST_TOKEN], end="", file=cur_line)
8890
except IndexError:
8991
logger.warning("Token not defined: 0x%02X (%d), at line %05d. "
90-
"Skipped." % (b, b, strnum))
92+
"Skipped.", b, b, strnum)
9193
else:
9294
if not strnum_lo[0]:
9395
strnum_lo = True, b
@@ -139,7 +141,7 @@ def parse_args(args):
139141
options = parser.parse_args(args)
140142
if len(args) == 0:
141143
raise ValueError
142-
except:
144+
except ValueError:
143145
parser.print_help()
144146
sys.exit(0)
145147

0 commit comments

Comments
 (0)