1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-28 13:00:16 -07:00

Merge pull request #25 from eljojo/retries

Don't stop monitoring work immediately
This commit is contained in:
Adrian Sampson 2019-07-04 10:51:05 -04:00
commit 3918ce69a3

View File

@ -335,6 +335,10 @@ class Session(object):
work_list = [{'deviceId': device_id, 'workId': work_id}]
res = self.post('rti/rtiResult', {'workList': work_list})['workList']
# Return None in case work hasn't started yet
if not 'returnCode' in res:
return None
# Check for errors.
code = res.get('returnCode') # returnCode can be missing.
if code != '0000':