minor clean-ups
This commit is contained in:
parent
2829acd6f5
commit
c3718d22d6
|
@ -2,6 +2,7 @@
|
|||
*.pyo
|
||||
__pycache__/
|
||||
*.log
|
||||
*.mo
|
||||
|
||||
/lib/Solaar.egg-info/
|
||||
/build/
|
||||
|
|
|
@ -208,6 +208,7 @@ class NamedInts(object):
|
|||
|
||||
|
||||
def strhex(x):
|
||||
assert x is not None
|
||||
"""Produce a hex-string representation of a sequence of bytes."""
|
||||
return _hexlify(x).decode('ascii').upper()
|
||||
|
||||
|
|
|
@ -263,7 +263,8 @@ class DeviceStatus(dict):
|
|||
|
||||
# Devices lose configuration when they are turned off,
|
||||
# make sure they're up-to-date.
|
||||
for s in self._device.settings:
|
||||
# _log.debug("%s settings %s", d, d.settings)
|
||||
for s in d.settings:
|
||||
s.apply()
|
||||
|
||||
if self.get(KEYS.BATTERY_LEVEL) is None:
|
||||
|
@ -285,7 +286,7 @@ class DeviceStatus(dict):
|
|||
self.updated = timestamp
|
||||
|
||||
# if _log.isEnabledFor(_DEBUG):
|
||||
# _log.debug("device %d changed: active=%s %s", self._device.number, self._active, dict(self))
|
||||
# _log.debug("device %d changed: active=%s %s", d.number, self._active, dict(self))
|
||||
self._changed_callback(d, alert, reason)
|
||||
|
||||
# def poll(self, timestamp):
|
||||
|
|
Loading…
Reference in New Issue