comparison py/uploader.py @ 230:185621f47040

run 2to3
author Matt Johnston <matt@ucc.asn.au>
date Fri, 10 Apr 2015 23:59:16 +0800
parents d9e81a563923
children e39ed85d87a5
comparison
equal deleted inserted replaced
229:99255c501e02 230:185621f47040
59 tosend = self.get_tosend(readings) 59 tosend = self.get_tosend(readings)
60 nreadings = len(readings) 60 nreadings = len(readings)
61 yield from self.send(tosend) 61 yield from self.send(tosend)
62 readings = None 62 readings = None
63 D("Sent updated %d readings" % nreadings) 63 D("Sent updated %d readings" % nreadings)
64 except Exception, e: 64 except Exception as e:
65 EX("Error in uploader: %s" % str(e)) 65 EX("Error in uploader: %s" % str(e))
66 finally: 66 finally:
67 if readings is not None: 67 if readings is not None:
68 self.server.pushfront(readings) 68 self.server.pushfront(readings)