Skip to content

Commit 0c09309

Browse files
committed
removed debug line and cleaned up - closes wpietri#57
1 parent 28da7c2 commit 0c09309

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sucks/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ def subscribe_to_ctls(self, function):
452452

453453
def _handle_ctl(self, message):
454454
the_good_part = message.get_payload()[0][0]
455-
_LOGGER.debug('Message payload: ' + ET.tostring(the_good_part, method='xml').decode())
456455
as_dict = self._ctl_to_dict(the_good_part)
457456
if as_dict is not None:
458457
for s in self.ctl_subscribers:
@@ -464,11 +463,11 @@ def _ctl_to_dict(self, xml):
464463
# This happens for commands with no response data, such as PlaySound
465464
# Handle response data with no 'td'
466465

467-
# return
468466
if 'type' in result: # single element with type and val
469-
result['event'] = "LifeSpan" # seems to always ben LifeSpan type
467+
result['event'] = "LifeSpan" # seems to always be LifeSpan type
468+
# don't need to update attrib since there's no child
470469

471-
else:
470+
else: # non-'type' result with child element that has attribs
472471
if len(xml) > 0: # case where there is child element
473472
if 'clean' in xml[0].tag:
474473
result['event'] = "CleanReport"

0 commit comments

Comments
 (0)