import * cleanups
This commit is contained in:
parent
8e9ff939f3
commit
ba55e4d9bd
|
@ -4,4 +4,15 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
__version__ = "0.6"
|
||||
|
||||
from hidapi.udev import *
|
||||
from hidapi.udev import (
|
||||
enumerate,
|
||||
open,
|
||||
close,
|
||||
open_path,
|
||||
monitor_glib,
|
||||
read,
|
||||
write,
|
||||
get_manufacturer,
|
||||
get_product,
|
||||
get_serial,
|
||||
)
|
||||
|
|
|
@ -235,6 +235,3 @@ class ChoicesValidator(object):
|
|||
# just assume the value was written correctly, otherwise there would not
|
||||
# be any reply_bytes to check
|
||||
return self.choices[value]
|
||||
|
||||
|
||||
__all__ = ('KIND', 'Setting', 'RegisterRW', 'FeatureRW', 'BooleanValidator', 'ChoicesValidator')
|
||||
|
|
|
@ -9,7 +9,7 @@ try:
|
|||
# this import is allowed to fail, in which case the entire feature is unavailable
|
||||
from gi.repository import Notify
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
from logging import getLogger, INFO as _INFO
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
|
@ -28,7 +28,8 @@ try:
|
|||
global available
|
||||
if available:
|
||||
if not Notify.is_initted():
|
||||
_log.info("starting desktop notifications")
|
||||
if _log.isEnabledFor(_INFO):
|
||||
_log.info("starting desktop notifications")
|
||||
try:
|
||||
return Notify.init(NAME)
|
||||
except:
|
||||
|
@ -39,7 +40,8 @@ try:
|
|||
|
||||
def uninit():
|
||||
if available and Notify.is_initted():
|
||||
_log.info("stopping desktop notifications")
|
||||
if _log.isEnabledFor(_INFO):
|
||||
_log.info("stopping desktop notifications")
|
||||
_notifications.clear()
|
||||
Notify.uninit()
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
from logging import getLogger # , DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
|
|
Loading…
Reference in New Issue