From dbeca659bd2f607569dcb42e21b0d81094239171 Mon Sep 17 00:00:00 2001 From: ichuang Date: Mon, 3 Sep 2012 20:32:07 -0400 Subject: [PATCH] suppress gunicorn error which is being caught by errortracker. The gunicorn error is of this form: Traceback (most recent call last): File "/home/ike/mitx_all/python/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 33, in run client, addr = self.socket.accept() File "/usr/lib/python2.7/socket.py", line 202, in accept sock, addr = self._sock.accept() error: [Errno 11] Resource temporarily unavailable --- common/lib/xmodule/xmodule/errortracker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/lib/xmodule/xmodule/errortracker.py b/common/lib/xmodule/xmodule/errortracker.py index 8ac2903149..e9ea233e09 100644 --- a/common/lib/xmodule/xmodule/errortracker.py +++ b/common/lib/xmodule/xmodule/errortracker.py @@ -35,6 +35,11 @@ def make_error_tracker(): if in_exception_handler(): exc_str = exc_info_to_str(sys.exc_info()) + # don't display irrelevant gunicorn sync error + if (('mitx_all/python/local/lib/python2.7/site-packages/gunicorn/workers/sync.py' in exc_str) and + ('[Errno 11] Resource temporarily unavailable' in exc_str)): + exc_str = '' + errors.append((msg, exc_str)) return ErrorLog(error_tracker, errors)