Skip to content

Commit 48ec974

Browse files
committed
log info about failed software version check
1 parent cf0a88c commit 48ec974

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tconnectsync/api/controliq.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def _build_login_data(self, email, password, soup):
5858
logger.warning("Newer API version than last confirmed working. Saw %s and expected %s" % (version, self.LAST_CONFIRMED_SOFTWARE_VERSION))
5959
logger.warning("If you experience any issues, please report them to https://github.com/jwoglom/tconnectsync")
6060
except Exception:
61-
logger.warning("Unable to find tconnect software version")
61+
logger.warning("Unable to find tconnect software version.")
62+
contents = "<unknown>"
63+
if soup:
64+
contents = "%s" % soup.encode_contents()
65+
if len(contents) > 1000:
66+
contents = "%s[SNIP]%s" % (contents[:500], contents[-500:])
67+
logger.info("BeautifulSoup parsed contents: %s" % contents)
6268
pass
6369
return {
6470
"__LASTFOCUS": "",

0 commit comments

Comments
 (0)