mirror of
https://github.com/pret/pokered.git
synced 2024-11-26 23:50:41 +00:00
startswith
works with a tuple
This commit is contained in:
parent
22859c4bb7
commit
2b52ceb718
@ -28,7 +28,7 @@ def main():
|
||||
if print_bank not in {'all', 'none'}:
|
||||
try:
|
||||
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))
|
||||
except ValueError:
|
||||
error = f'Error: invalid BANK: {print_bank}'
|
||||
|
Loading…
Reference in New Issue
Block a user