diff py/uploader.py @ 254:ffe25107d520

put more things inside "try"
author Matt Johnston <matt@ucc.asn.au>
date Mon, 08 Jun 2015 22:31:21 +0800
parents 86e638d564b0
children 6d06795aefbb
line wrap: on
line diff
--- a/py/uploader.py	Wed May 20 23:10:37 2015 +0800
+++ b/py/uploader.py	Mon Jun 08 22:31:21 2015 +0800
@@ -58,8 +58,8 @@
 
     @asyncio.coroutine
     def do(self):
-        readings = self.server.take_readings()
         try:
+            readings = self.server.take_readings()
             tosend = self.get_tosend(readings)
             nreadings = len(readings)
             yield from self.send(tosend)