From 70a3ec1accb6de1c1c273470af0ddfa2edc1b0a9 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 30 Sep 2022 16:55:35 -0400 Subject: [PATCH] `startswith` works with a tuple --- tools/free_space.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/free_space.py b/tools/free_space.py index 6d4ac00c4..35ab69902 100755 --- a/tools/free_space.py +++ b/tools/free_space.py @@ -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}'