Skip to content

fixed crash in case there is no weather data#483

Merged
Holzhaus merged 2 commits intojasperproject:jasper-devfrom
andweber:fix_weatherplugin
May 3, 2016
Merged

fixed crash in case there is no weather data#483
Holzhaus merged 2 commits intojasperproject:jasper-devfrom
andweber:fix_weatherplugin

Conversation

@andweber
Copy link

@andweber andweber commented Apr 3, 2016

The weather plugin should not crash in case there can be no data retrieved (see #475)

Simply added some checks if there is any data received and added an error msg for the user in case of no data. Please note: thats not a fix for #475. Thats still open.

I also changed the testcase success criteria so that it does not fail in case that there is no data received. This might not be the intention and may need to be changed back.

channel = content['query']['results']['weather']['rss']['channel']
except:
# return empty Weather
return Weather(city=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just return None instead.

@Holzhaus
Copy link
Member

Holzhaus commented Apr 4, 2016

Thanks for contributing. I left you some minor nits. I'll merge as soon as these have been fixed.

@GeoBeBee
Copy link

This Pull Request #483 is now covered by the successfully submitted #493 ('Default 4 syllable keyword HelloJasper works much better for new users').

@Holzhaus Holzhaus merged commit fda8e2d into jasperproject:jasper-dev May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants