Fix the version introspection capture by exception

This commit is contained in:
Stephen Boddy 2017-02-07 17:09:34 +01:00
parent 96a1e67749
commit 5f329928af
2 changed files with 4 additions and 4 deletions

View File

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

View File

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