Mercurial > templog
comparison py/uploader.py @ 295:424f1446f214
fix for updated aiohttp
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Jul 2019 18:35:52 +0800 |
parents | 78c542f03030 |
children | ca06059e76de |
comparison
equal
deleted
inserted
replaced
287:97d99eb42d27 | 295:424f1446f214 |
---|---|
69 D("tosend >>>%s<<<" % str(tosend)) | 69 D("tosend >>>%s<<<" % str(tosend)) |
70 nreadings = len(readings) | 70 nreadings = len(readings) |
71 yield from self.send(tosend) | 71 yield from self.send(tosend) |
72 readings = None | 72 readings = None |
73 D("Sent updated %d readings" % nreadings) | 73 D("Sent updated %d readings" % nreadings) |
74 except aiohttp.errors.ClientError as e: | 74 except aiohttp.ClientResponseError as e: |
75 self.limitlog.log("Error with uploader: %s" % str(e)) | 75 self.limitlog.log("Error with uploader: %s" % str(e)) |
76 except asyncio.TimeoutError as e: | 76 except asyncio.TimeoutError as e: |
77 self.limitlog.log("uploader http timed out: %s" % str(e)) | 77 self.limitlog.log("uploader http timed out: %s" % str(e)) |
78 except self.BadServerResponse as e: | 78 except self.BadServerResponse as e: |
79 self.limitlog.log("Bad reply with uploader: %s" % str(e)) | 79 self.limitlog.log("Bad reply with uploader: %s" % str(e)) |