Implemented a global variable for acceptable handlers

This commit is contained in:
Logan Cusano
2022-02-18 20:32:57 -05:00
parent 0ff0289997
commit fc30c6a183

View File

@@ -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