Weather: don't error if temperature is not available

This commit is contained in:
James Lu 2015-09-28 13:06:56 -07:00
parent 03a29d72ad
commit 3f1e76384b

View File

@ -228,9 +228,9 @@ class Weather(callbacks.Plugin):
s = ircutils.mircColor(s, color) s = ircutils.mircColor(s, color)
# return. # return.
return s return s
except ValueError as e: except (TypeError, ValueError) as e:
self.log.info("Weather: ValueError trying to convert temp: {0} message: {1}".format(f, e)) self.log.info("Weather: ValueError trying to convert temp: {0} message: {1}".format(f, e))
return f return "N/A"
def _wind(self, angle, useSymbols=False): def _wind(self, angle, useSymbols=False):
"""Converts degrees to direction for wind. Can optionally return a symbol.""" """Converts degrees to direction for wind. Can optionally return a symbol."""