Fix tools/free_space.py

This commit is contained in:
Rangi 2020-11-21 21:14:32 -05:00
parent 145e752266
commit 4ca9f45db7

View File

@ -19,13 +19,11 @@ def main():
print_bank = 'none' print_bank = 'none'
mapfile = 'pokecrystal.map' mapfile = 'pokecrystal.map'
if len(sys.argv) >= 2 and sys.argv[1].startswith('BANK='): for arg in sys.argv[1:]:
print_bank = sys.argv[1].split('=', 1)[-1] if arg.startswith('BANK='):
if len(sys.argv) >= 3: print_bank = arg.split('=', 1)[-1]
mapfile = sys.argv[2] else:
elif len(sys.argv) >= 3 and sys.argv[2].startswith('BANK='): mapfile = arg
print_bank = sys.argv[2].split('=', 1)[-1]
mapfile = sys.argv[1]
if print_bank not in {'all', 'none'}: if print_bank not in {'all', 'none'}:
try: try: