Mercurial > templog
diff py/sensor_ds18b20.py @ 529:5201f441bf4a
run 2to3
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 10 Apr 2015 23:59:16 +0800 |
parents | dd8895652485 |
children | 659953f2ee03 |
line wrap: on
line diff
--- a/py/sensor_ds18b20.py Fri Apr 10 23:55:07 2015 +0800 +++ b/py/sensor_ds18b20.py Fri Apr 10 23:59:16 2015 +0800 @@ -65,14 +65,14 @@ E("Problem reading sensor '%s': %f" % (s, temp)) return None return temp - except Exception, e: + except Exception as e: EX("Problem reading sensor '%s': %s" % (s, str(e))) return None def do_internal(self): try: return int(open(config.INTERNAL_TEMPERATURE, 'r').read()) / 1000.0 - except Exception, e: + except Exception as e: EX("Problem reading internal sensor: %s" % str(e)) return None