fix return value of iter_city_search (closes #457)

This commit is contained in:
Romain Bignon 2011-01-02 22:43:54 +01:00
commit 1edaf7fd9f
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ class MeteofranceBrowser(BaseBrowser):
else:
# Case 2: there is only one result, and the website send directly
# the browser on the forecast page:
return self.page.get_city()
return [self.page.get_city()]
def iter_forecast(self, city_id):
self.location(self.WEATHER_URL.format(cityid=city_id))

View file

@ -97,7 +97,7 @@ class IFormatter(object):
@param selected_fields [tuple] fields to display. If None, all fields are selected
@return a string of the formatted object
"""
assert isinstance(obj, (dict, CapBaseObject, tuple))
assert isinstance(obj, (dict, CapBaseObject, tuple)), 'Object is unexpected type "%r"' % obj
if isinstance(obj, dict):
item = obj