added test to ensure shortcuts in config.yml

This patch adds a simple test to ensure that 'shortcuts' is part of
the config.yml
This commit is contained in:
Walter A. Boring IV 2018-11-21 15:25:31 -08:00
parent e3964c5426
commit 8d1d2933e8
1 changed files with 5 additions and 1 deletions

View File

@ -109,7 +109,11 @@ else:
# Now read the ~/.aprds/config.yml
config = utils.get_config()
shortcuts = config['shortcuts']
if 'shortcuts' in config:
shortcuts = config['shortcuts']
else:
print("missing 'shortcuts' section of config.yml")
sys.exit(-1)
try:
tn = telnetlib.Telnet(HOST, 14580)