mirror of https://github.com/pret/pokecrystal.git
`startswith` works with a tuple
This commit is contained in:
parent
f76f5c3583
commit
70a3ec1acc
|
@ -28,7 +28,7 @@ def main():
|
||||||
if print_bank not in {'all', 'none'}:
|
if print_bank not in {'all', 'none'}:
|
||||||
try:
|
try:
|
||||||
print_bank = (int(print_bank[2:], 16)
|
print_bank = (int(print_bank[2:], 16)
|
||||||
if print_bank.startswith('0x') or print_bank.startswith('0X')
|
if print_bank.startswith(('0x', '0X'))
|
||||||
else int(print_bank))
|
else int(print_bank))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
error = f'Error: invalid BANK: {print_bank}'
|
error = f'Error: invalid BANK: {print_bank}'
|
||||||
|
|
Loading…
Reference in New Issue