correctly handle errors
This commit is contained in:
parent
6c22505f71
commit
bf754b1859
2 changed files with 7 additions and 21 deletions
|
|
@ -46,7 +46,7 @@ class YahooBackend(BaseBackend, ICapWeather):
|
|||
dom = minidom.parse(handler)
|
||||
handler.close()
|
||||
if not dom.getElementsByTagName('yweather:condition'):
|
||||
raise CityNotFound()
|
||||
raise CityNotFound('City not found: %s' % city_id)
|
||||
|
||||
return dom
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue