# HG changeset patch # User Matt Johnston # Date 1350911311 -28800 # Node ID 8841a709ae78c2eb0a25ea0f1c520b274300b6b8 # Parent c95737913174ad4d8c704617149b4c8920ff82d3 strip multiple-of-ten temperatures correctly diff -r c95737913174 -r 8841a709ae78 web/log.py --- a/web/log.py Mon Oct 22 21:08:11 2012 +0800 +++ b/web/log.py Mon Oct 22 21:08:31 2012 +0800 @@ -90,7 +90,7 @@ if unit: try: last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds']) - format_last_value = ('%f' % last_value).rstrip('0.') + unit + format_last_value = ('%f' % last_value).rstrip('0').rstrip('.') + unit except ValueError: pass width = config.LINE_WIDTH