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
|
||||
# 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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user