From 5f329928af0c685b2de2611599a2c997244c3aaf Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Tue, 7 Feb 2017 17:09:34 +0100 Subject: [PATCH] Fix the version introspection capture by exception --- terminatorlib/plugins/activitywatch.py | 4 ++-- terminatorlib/window.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terminatorlib/plugins/activitywatch.py b/terminatorlib/plugins/activitywatch.py index de474a08..6743233f 100755 --- a/terminatorlib/plugins/activitywatch.py +++ b/terminatorlib/plugins/activitywatch.py @@ -21,8 +21,8 @@ try: # This is inside this try so we only make the plugin available if pynotify # is present on this computer. AVAILABLE = ['ActivityWatch', 'InactivityWatch'] -except ImportError: - err(_('ActivityWatch plugin unavailable: please install python-notify')) +except (ImportError, ValueError): + err('ActivityWatch plugin unavailable as we cannot import Notify') config = Config() inactive_period = float(config.plugin_get('InactivityWatch', 'inactive_period', diff --git a/terminatorlib/window.py b/terminatorlib/window.py index e27bc1b3..d2e558d3 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -23,8 +23,8 @@ if display_manager() == 'X11': gi.require_version('Keybinder', '3.0') from gi.repository import Keybinder Keybinder.init() - except ImportError: - err('Warning: python-keybinder is not installed. This means the \ + except (ImportError, ValueError): + err('Unable to load Keybinder module. This means the \ hide_window shortcut will be unavailable') # pylint: disable-msg=R0904