From 3f1e76384bbfb469538e3d5496a400507eb81dcf Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 28 Sep 2015 13:06:56 -0700 Subject: [PATCH] Weather: don't error if temperature is not available --- Weather/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Weather/plugin.py b/Weather/plugin.py index 2de1e2c..7e0e6c1 100644 --- a/Weather/plugin.py +++ b/Weather/plugin.py @@ -228,9 +228,9 @@ class Weather(callbacks.Plugin): s = ircutils.mircColor(s, color) # return. 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)) - return f + return "N/A" def _wind(self, angle, useSymbols=False): """Converts degrees to direction for wind. Can optionally return a symbol."""