mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Catch the proper errors when a field isn't found.
This commit is contained in:
parent
9f6e826481
commit
4030026c4c
@ -412,7 +412,7 @@ class Weather(callbacks.Plugin):
|
||||
else:
|
||||
dew = deg.join((dew, unit))
|
||||
resp.append('Dew Point: %s.' % dew)
|
||||
except ValueError:
|
||||
except (ValueError, KeyError):
|
||||
pass
|
||||
try:
|
||||
resp.append('Wind: %s at %s %s.' % tuple(info['Wind'].split()))
|
||||
@ -425,7 +425,7 @@ class Weather(callbacks.Plugin):
|
||||
else:
|
||||
dew = deg.join((chill, unit))
|
||||
resp.append('Windchill: %s.' % chill)
|
||||
except (ValueError, TypeError):
|
||||
except (ValueError, KeyError):
|
||||
pass
|
||||
if info['Pressure']:
|
||||
resp.append('Pressure: %s.' % info['Pressure'])
|
||||
|
Loading…
Reference in New Issue
Block a user