Skip to content

Commit

Permalink
catch a TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
ksanislo committed Jan 3, 2019
1 parent f327fd6 commit de5c82d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tcc-exporter
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ from http.cookiejar import LWPCookieJar
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.error import HTTPError, URLError

VERSION = '1.1.2'
VERSION = '1.1.3'
CONFIG_FILE = os.environ.get('TCC_CONFIG_FILE', 'persistent/config.yml')
PREFIX = 'https://mytotalconnectcomfort.com/'

Expand Down Expand Up @@ -93,6 +93,9 @@ class Client(object):
except URLError as e:
log('INFO', 'Portal status: 504 - {0!r}'.format(e.reason))
return 504
except TypeError as e:
log('INFO', 'Portal status: 504 - Whisky. Tango. Foxtrot. (TypeError)')
return 504
except ConnectionResetError as e:
log('INFO', 'Portal status: 502 - Connection reset by peer')
return 502
Expand Down

0 comments on commit de5c82d

Please sign in to comment.