From e4d9b16339fb5368a1018a9d21250e9cd52fd14f Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 10 Mar 2014 09:45:41 -0700 Subject: [PATCH] Fix exception logging. Exception objects do not have msg attributes they have message attributes. Use message instead of msg. Also use logger.warning() instead of logger.warn() to be consistent with python documentation. Change-Id: I49be960202f3fa1add19f3068ff824ae9d7f8314 --- elastic_recheck/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elastic_recheck/bot.py b/elastic_recheck/bot.py index 792a1866..cf381aa5 100755 --- a/elastic_recheck/bot.py +++ b/elastic_recheck/bot.py @@ -198,8 +198,8 @@ class RecheckWatch(threading.Thread): event, debug=not self.commenting) except er.ResultTimedOut as e: - self.log.warn(e.msg) - self._read(msg=e.msg) + self.log.warning(e.message) + self._read(msg=e.message) except Exception: self.log.exception("Uncaught exception processing event.")