From 9b6eceeb87df0c114d84113f1f00b0d457811aa6 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 13 Feb 2019 00:17:21 +0100 Subject: [PATCH] catch nonexisting command --- src/fenrirscreenreader/core/commandManager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/commandManager.py b/src/fenrirscreenreader/core/commandManager.py index b754534d..9615acde 100644 --- a/src/fenrirscreenreader/core/commandManager.py +++ b/src/fenrirscreenreader/core/commandManager.py @@ -244,7 +244,10 @@ class commandManager(): self.env['commandInfo']['lastCommandExecutionTime'] = time.time() def commandExists(self, command, section = 'commands'): - return( command in self.env['commands'][section]) + try: + return( command in self.env['commands'][section]) + except: + return False def getShortcutForCommand(self, command): shortcut = '' try: