capabilities.weather: cosmetic change

This commit is contained in:
Matthieu Weber 2015-02-08 20:08:03 +01:00 committed by Romain Bignon
commit 63eed107e3

View file

@ -43,17 +43,17 @@ class Temperature(BaseObject):
if not self.unit:
return u'%s' % int(round(self.value))
elif self.unit == 'F':
return u'%s°F' % int(round(self.value))
return u'%s °F' % int(round(self.value))
else:
return u'%s°F' % int(round((self.value * 9.0 / 5.0) + 32))
return u'%s °F' % int(round((self.value * 9.0 / 5.0) + 32))
def ascelsius(self):
if not self.unit:
return u'%s' % int(round(self.value))
elif self.unit == 'C':
return u'%s°C' % int(round(self.value))
return u'%s °C' % int(round(self.value))
else:
return u'%s°C' % int(round((self.value - 32.0) * 5.0 / 9.0))
return u'%s °C' % int(round((self.value - 32.0) * 5.0 / 9.0))
def __repr__(self):
if self.value is not None and self.unit: