minor clean-ups

This commit is contained in:
Daniel Pavel 2013-07-18 20:36:27 +02:00
parent 2829acd6f5
commit c3718d22d6
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.pyo
__pycache__/
*.log
*.mo
/lib/Solaar.egg-info/
/build/

View File

@ -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()

View File

@ -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):