From de4a938d7e6bbc80a2fbfaf258cb77b03964e092 Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Mon, 3 Nov 2014 15:29:17 +0100 Subject: [PATCH] [CapWeather] browser2 adaptation : do not require an id in constructor --- weboob/capabilities/weather.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weboob/capabilities/weather.py b/weboob/capabilities/weather.py index a6c41859..010bf543 100644 --- a/weboob/capabilities/weather.py +++ b/weboob/capabilities/weather.py @@ -32,7 +32,7 @@ class Temperature(BaseObject): value = FloatField('Temperature value') unit = StringField('Input unit') - def __init__(self, value, unit = u''): + def __init__(self, value=None, unit = u''): BaseObject.__init__(self, value) self.value = value if unit not in [u'C', u'F']: @@ -69,7 +69,7 @@ class Forecast(BaseObject): high = Field('High temperature', Temperature) text = StringField('Comment on forecast') - def __init__(self, date, low, high, text, unit): + def __init__(self, date=None, low=None, high=None, text=None, unit=None): BaseObject.__init__(self, unicode(date)) self.date = date self.low = Temperature(low, unit) @@ -85,7 +85,7 @@ class Current(BaseObject): text = StringField('Comment about current weather') temp = Field('Current temperature', Temperature) - def __init__(self, date, temp, text, unit): + def __init__(self, date=None, temp=None, text=None, unit=None): BaseObject.__init__(self, unicode(date)) self.date = date self.text = text @@ -98,7 +98,7 @@ class City(BaseObject): """ name = StringField('Name of city') - def __init__(self, id, name): + def __init__(self, id=None, name=None): BaseObject.__init__(self, id) self.name = name