From e7ad30eac0235dacb2cefff3b47ffa6b3f761aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Axelsson?= Date: Thu, 21 Dec 2017 18:51:47 -0800 Subject: [PATCH] Removed error handler in EcoVacsXMPP The _handle_error method was throwing a runtime error because it expects an XML element The functionality in _handle_error is covered by _handle_ctl so it can be removed altogether --- sucks/__init__.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sucks/__init__.py b/sucks/__init__.py index b12c115..8e54a65 100644 --- a/sucks/__init__.py +++ b/sucks/__init__.py @@ -135,7 +135,6 @@ class VacBot(): self.battery_status = None self.xmpp = EcoVacsXMPP(user, domain, resource, secret, continent) - self.xmpp.register_callback("error", self._handle_error) self.xmpp.subscribe_to_ctls(self._handle_ctl) def connect_and_wait_until_ready(self): @@ -171,11 +170,6 @@ class VacBot(): logging.warning("Unknown charging status '" + report + "'") logging.debug("*** charge_status = " + self.charge_status) - def _handle_error(self, iq): - error = iq.find('{com:ctl}query/{com:ctl}ctl').get('error') - error_no = iq.find('{com:ctl}query/{com:ctl}ctl').get('errno') - logging.debug("*** error = " + error_no + " " + error) - def _vacuum_address(self): return self.vacuum['did'] + '@' + self.vacuum['class'] + '.ecorobot.net/atom'