# HG changeset patch # User Matt Johnston # Date 1434203811 -28800 # Node ID 205809a8872f0a90b474cae47596fa4d3664c9f5 # Parent 654caee52c83c70d7d1cd40a034d5ba35b1eded4 integer division diff -r 654caee52c83 -r 205809a8872f 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 654caee52c83 -r 205809a8872f 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()