summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-10-18 10:10:45 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-10-18 10:13:13 +0900
commitf0e558f748015a374f10a3267d4ad7d1995c2378 (patch)
treeb19e3db78596ee32710ac9d627657e2b3a68fa4b
parent58210c406789d07697344d3287416581a8d9a45f (diff)
downloadpygerrit-f0e558f748015a374f10a3267d4ad7d1995c2378.tar.gz
Suppress pylint warning about catching too general exception
Commit 06c88c8 (merged with pull request #13) added exception handling: except Exception as e: which causes a pylint warning: W0703: Catching too general exception Exception However in this case we actually do want to catch all types of exception because the intention is to make sure pygerrit doesn't fall over when something unexpected happens. Add a suppression of this warning. The suppression is only effective on this particular line; the warning will be raised again if we do the same thing again somewhere else. Change-Id: If812d441c1dc625651db34c6d3763cedc98b68a9
-rw-r--r--pygerrit/stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygerrit/stream.py b/pygerrit/stream.py
index 1834d66..1705bf0 100644
--- a/pygerrit/stream.py
+++ b/pygerrit/stream.py
@@ -68,6 +68,6 @@ class GerritStream(Thread):
else:
data = stdout.readline()
self._gerrit.put_event(data)
- except Exception as e:
+ except Exception as e: # pylint: disable=W0703
self._error_event(repr(e))
self._stop.set()