From 46b9ae57718d1c295890bdb63986cc5729e76100 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 29 May 2014 23:48:56 +0200 Subject: [PATCH] Use except x as y instead of except x, y According to https://docs.python.org/3/howto/pyporting.html the syntax changed in Python 3.x. The new syntax is usable with Python >= 2.6 and should be preferred to be compatible with Python3. Enabled hacking check H231. Change-Id: I4c20a04bc7732efc2d4bbcbc3d285107b244e5fa --- files/log-gearman-worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/log-gearman-worker.py b/files/log-gearman-worker.py index 23ca4dc..0a418d7 100644 --- a/files/log-gearman-worker.py +++ b/files/log-gearman-worker.py @@ -180,7 +180,7 @@ class LogRetriever(threading.Thread): raw_buf = b'' try: gzipped, raw_buf = self._get_log_data(source_url, retry) - except urllib2.HTTPError, e: + except urllib2.HTTPError as e: if e.code == 404: logging.info("Unable to retrieve %s: HTTP error 404" % source_url)