Mercurial > templog
changeset 436:8841a709ae78
strip multiple-of-ten temperatures correctly
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 22 Oct 2012 21:08:31 +0800 |
parents | c95737913174 |
children | 7d7e7f961eae |
files | web/log.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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