Fix the version introspection capture by exception
This commit is contained in:
parent
96a1e67749
commit
5f329928af
|
@ -21,8 +21,8 @@ try:
|
||||||
# This is inside this try so we only make the plugin available if pynotify
|
# This is inside this try so we only make the plugin available if pynotify
|
||||||
# is present on this computer.
|
# is present on this computer.
|
||||||
AVAILABLE = ['ActivityWatch', 'InactivityWatch']
|
AVAILABLE = ['ActivityWatch', 'InactivityWatch']
|
||||||
except ImportError:
|
except (ImportError, ValueError):
|
||||||
err(_('ActivityWatch plugin unavailable: please install python-notify'))
|
err('ActivityWatch plugin unavailable as we cannot import Notify')
|
||||||
|
|
||||||
config = Config()
|
config = Config()
|
||||||
inactive_period = float(config.plugin_get('InactivityWatch', 'inactive_period',
|
inactive_period = float(config.plugin_get('InactivityWatch', 'inactive_period',
|
||||||
|
|
|
@ -23,8 +23,8 @@ if display_manager() == 'X11':
|
||||||
gi.require_version('Keybinder', '3.0')
|
gi.require_version('Keybinder', '3.0')
|
||||||
from gi.repository import Keybinder
|
from gi.repository import Keybinder
|
||||||
Keybinder.init()
|
Keybinder.init()
|
||||||
except ImportError:
|
except (ImportError, ValueError):
|
||||||
err('Warning: python-keybinder is not installed. This means the \
|
err('Unable to load Keybinder module. This means the \
|
||||||
hide_window shortcut will be unavailable')
|
hide_window shortcut will be unavailable')
|
||||||
|
|
||||||
# pylint: disable-msg=R0904
|
# pylint: disable-msg=R0904
|
||||||
|
|
Loading…
Reference in New Issue