summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2019-04-11 18:41:56 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2019-04-11 18:42:40 +0200
commitde154334edf19dfa5d661188495fd5bfbc1e6843 (patch)
tree17e6dbb419ca43d33f0c93f8177953c34d20f3e9
parent6f1d05bbc21516fde45b190b4cd539b7332b56b3 (diff)
Fix crash when not running in batch mode
When invoked without the <profile> specified, the script crashed by throwing an uncaught exception. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rwxr-xr-xmonitor-menu.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor-menu.py b/monitor-menu.py
index c81f753..48e12a4 100755
--- a/monitor-menu.py
+++ b/monitor-menu.py
@@ -62,7 +62,7 @@ def main(argv=None):
menu = MonitorMenu()
try:
- if '<profile>' in args:
+ if '<profile>' in args and args['<profile>'] is not None:
menu.run(int(args['<profile>']))
else:
menu.run()