From f667fb972bdf5bf8dcbcc66e7a47d2900304c2a6 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 22 Jan 2014 12:30:28 +0100 Subject: [PATCH] Fix #1333: zero temperature can not be displayed In __repr__ of Temperature object, the test "if self.value" failed if the temperature is zero. --- weboob/capabilities/weather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weboob/capabilities/weather.py b/weboob/capabilities/weather.py index 90422817..4362b750 100644 --- a/weboob/capabilities/weather.py +++ b/weboob/capabilities/weather.py @@ -56,7 +56,7 @@ class Temperature(CapBaseObject): return u'%s°C' % int(round((self.value - 32.0) * 5.0 / 9.0)) def __repr__(self): - if self.value and self.unit: + if self.value is not None and self.unit: return u'%s %s' % (self.value, self.unit)