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"
|
__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
|
# just assume the value was written correctly, otherwise there would not
|
||||||
# be any reply_bytes to check
|
# be any reply_bytes to check
|
||||||
return self.choices[value]
|
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
|
# this import is allowed to fail, in which case the entire feature is unavailable
|
||||||
from gi.repository import Notify
|
from gi.repository import Notify
|
||||||
|
|
||||||
from logging import getLogger, DEBUG as _DEBUG
|
from logging import getLogger, INFO as _INFO
|
||||||
_log = getLogger(__name__)
|
_log = getLogger(__name__)
|
||||||
del getLogger
|
del getLogger
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ try:
|
||||||
global available
|
global available
|
||||||
if available:
|
if available:
|
||||||
if not Notify.is_initted():
|
if not Notify.is_initted():
|
||||||
|
if _log.isEnabledFor(_INFO):
|
||||||
_log.info("starting desktop notifications")
|
_log.info("starting desktop notifications")
|
||||||
try:
|
try:
|
||||||
return Notify.init(NAME)
|
return Notify.init(NAME)
|
||||||
|
@ -39,6 +40,7 @@ try:
|
||||||
|
|
||||||
def uninit():
|
def uninit():
|
||||||
if available and Notify.is_initted():
|
if available and Notify.is_initted():
|
||||||
|
if _log.isEnabledFor(_INFO):
|
||||||
_log.info("stopping desktop notifications")
|
_log.info("stopping desktop notifications")
|
||||||
_notifications.clear()
|
_notifications.clear()
|
||||||
Notify.uninit()
|
Notify.uninit()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
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__)
|
_log = getLogger(__name__)
|
||||||
del getLogger
|
del getLogger
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue