# HG changeset patch # User Matt Johnston # Date 1434203811 -28800 # Node ID dd809548424c9d4ab9a9738f0a1bdcb2fbea9e9f # Parent 55cae4f27e75407687bc1d7e9ceec066a9bcb5f9 integer division diff -r 55cae4f27e75 -r dd809548424c py/config.py --- a/py/config.py Wed Jun 10 00:13:26 2015 +0800 +++ b/py/config.py Sat Jun 13 21:56:51 2015 +0800 @@ -8,7 +8,7 @@ FRIDGE_WORT_INVALID_TIME = 300 # 5 mins # 12 hours of "offline" readings stored -MAX_READINGS = 12*60*60 / SENSOR_SLEEP +MAX_READINGS = 12*60*60 // SENSOR_SLEEP PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf') diff -r 55cae4f27e75 -r dd809548424c web/templog.py --- a/web/templog.py Wed Jun 10 00:13:26 2015 +0800 +++ b/web/templog.py Sat Jun 13 21:56:51 2015 +0800 @@ -115,11 +115,11 @@ + timedelta(minutes=(float(xpos) / (config.GRAPH_WIDTH * config.ZOOM)) * minutes) minutes = int(minutes / ZOOM_SCALE) - end = click_time + timedelta(minutes=minutes/2) + end = click_time + timedelta(minutes=minutes//2) else: # zoom out minutes = int(minutes*ZOOM_SCALE) - end += timedelta(minutes=minutes/2) + end += timedelta(minutes=minutes//2) if end > datetime.now(): end = datetime.now()