diff --git a/tcc-exporter b/tcc-exporter index 837c753..e1d3662 100755 --- a/tcc-exporter +++ b/tcc-exporter @@ -12,7 +12,7 @@ import urllib.request from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.error import HTTPError -VERSION = '0.8.1' +VERSION = '0.8.2' PREFIX = 'https://mytotalconnectcomfort.com/' devices = list() @@ -52,10 +52,10 @@ class Client(object): data = self.urlopener.open(request) # actually sign in decoded = data.read().decode() if '/portal/Account/LogOff' in decoded: - log('INFO', 'TCC portal login success.') + log('INFO', 'TCC portal login successful.') self._backoff = 0 else: - log('INFO', 'TCC portal login failure.') + log('INFO', 'TCC portal login failed.') raise ValueError('login_failure') except ValueError: if (self._backoff < self._min_backoff): @@ -64,11 +64,11 @@ class Client(object): self._backoff = self._max_backoff else: self._backoff = self._backoff * 2 - log('INFO', 'Setting backoff to {0} seconds.'.format(self._backoff)) + log('INFO', 'Set login retry delay to {0} seconds.'.format(self._backoff)) except Exception as e: log('WARNING', '{0} {1}: {2!r}'.format(inspect.currentframe().f_code.co_name, type(e).__name__, e.args)) else: - log('INFO', 'Backoff in effect, login() delayed another {0} seconds.'.format(self._last_login + self._backoff - utc_seconds)) + log('INFO', 'Login retry delayed another {0} seconds.'.format(self._last_login + self._backoff - utc_seconds)) def _request(self, path, data={}, headers={}): if isinstance(data, str):