# HG changeset patch # User Matt Johnston # Date 1350911311 -28800 # Node ID d36fe81077cc4666bacb2bb76be4abb3e7b90a7d # Parent 2b112f9ab440c13cd0f1754ee3a7a185557e44b2 strip multiple-of-ten temperatures correctly diff -r 2b112f9ab440 -r d36fe81077cc 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