From fc30c6a183e22c10a290dfc92e4b33e4c86696d4 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Fri, 18 Feb 2022 20:32:57 -0500 Subject: [PATCH] Implemented a global variable for acceptable handlers --- BotResources.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BotResources.py b/BotResources.py index 0d05b7e..4052be6 100644 --- a/BotResources.py +++ b/BotResources.py @@ -2,6 +2,8 @@ import sound import configparser from os.path import exists +PDB_ACCEPTABLE_HANDLERS = ['gqrx', 'op25'] + def check_if_config_exists(): if exists('./config.ini'): @@ -167,7 +169,7 @@ def get_handler(): handler = None while not handler: handler = str(input(f"Please enter the name of the handler you would like to use:\t")) - if handler == "gqrx": + if handler in PDB_ACCEPTABLE_HANDLERS: return handler elif handler == '': return handler