ref: 70a3ec1accb6de1c1c273470af0ddfa2edc1b0a9
parent: f76f5c3583b729c8c78f23ae46ddae9254e8a906
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Sep 30 12:55:35 EDT 2022
`startswith` works with a tuple
--- a/tools/free_space.py
+++ b/tools/free_space.py
@@ -28,7 +28,7 @@
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}'