mirror of
https://github.com/vale981/clay
synced 2025-03-05 09:31:40 -05:00
Fix some pylint warnings
This commit is contained in:
parent
7b1980a522
commit
3a4356b390
1 changed files with 8 additions and 8 deletions
|
@ -3,20 +3,20 @@ Hotkeys management.
|
|||
Requires "gi" package and "Gtk" & "Keybinder" modules.
|
||||
"""
|
||||
# pylint: disable=broad-except
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from clay.settings import Settings
|
||||
from clay.eventhook import EventHook
|
||||
from clay.notifications import NotificationArea
|
||||
from clay.log import Logger
|
||||
|
||||
def report_error(error):
|
||||
Logger.get().error("{0}: {1}".format(error.__class__.__name__, error))
|
||||
|
||||
IS_INIT = False
|
||||
try:
|
||||
# pylint: disable=import-error
|
||||
import gi
|
||||
gi.require_version('Keybinder', '3.0') # noqa
|
||||
gi.require_version('Gtk', '3.0') # noqa
|
||||
from gi.repository import Keybinder, Gtk
|
||||
IS_INIT = False
|
||||
# pylint: enable=import-error
|
||||
except ImportError as error:
|
||||
report_error(error)
|
||||
|
@ -30,9 +30,9 @@ except Exception as error:
|
|||
else:
|
||||
IS_INIT = True
|
||||
|
||||
from clay.settings import Settings
|
||||
from clay.eventhook import EventHook
|
||||
from clay.notifications import NotificationArea
|
||||
def report_error(error_msg):
|
||||
"Print an error message to the debug screen"
|
||||
Logger.get().error("{0}: {1}".format(error.__class__.__name__, error_msg))
|
||||
|
||||
|
||||
class HotkeyManager(object):
|
||||
|
|
Loading…
Add table
Reference in a new issue