comparison py/uploader.py @ 297:ca06059e76de

merge
author Matt Johnston <matt@ucc.asn.au>
date Sat, 06 Jul 2019 18:37:21 +0800
parents 6bacd8ca9f8f 424f1446f214
children b0c0e88cbfcc
comparison
equal deleted inserted replaced
296:8441916e3095 297:ca06059e76de
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))