From cfd6ec4e003917d17d2a4b315782143c432cfd6c Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 3 Nov 2014 16:32:53 +0000 Subject: [PATCH] Change to suppress reporting of Tornado exception error 1. --- CHANGES.md | 3 ++- tornado/http1connection.py | 5 +++-- tornado/iostream.py | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a3527358..791ee605 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,7 @@ * Fix proxy_indexers setting not loading from config file * Add subtitle information to the cmd show and cmd shows api output * Removed requirement for http login for API when an API key is provided +* Change API now uses Timezone setting at General Config/Interface/User Interface/ at relevant endpoints [develop changelog] * Improve display of progress bars in the Downloads columns of the show list page @@ -49,7 +50,7 @@ * Fix and repositioned show_message on display show to use bootstrap styling * Remove commented out html from display show accidently left in during UI changes * Fix display issue of season tables in displayShow view / Display Specials -* Change API now uses Timezone setting at General Config/Interface/User Interface/ at relevant endpoints +* Change to suppress reporting of Tornado exception error 1 ### 0.2.1 (2014-10-22 06:41:00 UTC) diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 90895cc9..8a5f46c4 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -686,8 +686,9 @@ class HTTP1ServerConnection(object): # This exception was already logged. conn.close() return - except Exception: - gen_log.error("Uncaught exception", exc_info=True) + except Exception as e: + if 1 != e.errno: + gen_log.error("Uncaught exception", exc_info=True) conn.close() return if not ret: diff --git a/tornado/iostream.py b/tornado/iostream.py index eced6d64..69f43957 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -601,8 +601,9 @@ class BaseIOStream(object): pos = self._read_to_buffer_loop() except UnsatisfiableReadError: raise - except Exception: - gen_log.warning("error on read", exc_info=True) + except Exception as e: + if 1 != e.errno: + gen_log.warning("error on read", exc_info=True) self.close(exc_info=True) return if pos is not None: