[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-45-g50a8252

X2Go dev team git-admin at x2go.org
Wed Oct 2 13:00:48 CEST 2013


The branch, master has been updated
       via  50a8252b21cdca1ddfd64a6ff2f0991717de9cb7 (commit)
      from  f7b96154cd92b53dbbd02201bff37964391b2889 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 50a8252b21cdca1ddfd64a6ff2f0991717de9cb7
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Oct 2 13:00:38 2013 +0200

    Catch RequestHandler errors and write them to the error log channel.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog         |    1 +
 x2gobroker/web/extras.py |    8 +++++++-
 x2gobroker/web/plain.py  |    8 +++++++-
 x2gobroker/web/uccs.py   |    7 ++++++-
 4 files changed, 21 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 2772c85..f999f4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,7 @@ x2gobroker (0.0.3.0-0~x2go1) UNRELEASED; urgency=low
     - Let an ICMP ping request precede the SSH ping command. This notably
       reduces timeout duration if the host running the queried broker agent
       is down).
+    - Catch RequestHandler errors and write them to the error log channel.
   * /debian/control:
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
   * /debian/x2gobroker-agent.dirs:
diff --git a/x2gobroker/web/extras.py b/x2gobroker/web/extras.py
index 6bce172..1ff31ae 100644
--- a/x2gobroker/web/extras.py
+++ b/x2gobroker/web/extras.py
@@ -30,7 +30,13 @@ x2gobroker._paramiko.monkey_patch_paramiko()
 
 import x2gobroker.defaults
 
-class X2GoBrokerPubKeyService(tornado.web.RequestHandler):
+
+class _RequestHandler(tornado.web.RequestHandler):
+    def _handle_request_exception(self, e):
+        logger_error.error('HTTP request error: {error_msg}'.format(error_msg=unicode(e)))
+
+
+class X2GoBrokerPubKeyService(_RequestHandler):
 
     http_header_items = {
         'Content-Type': 'text/plain; charset=utf-8',
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index 39ab7a8..0ef2564 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -30,7 +30,13 @@ import x2gobroker.defaults
 
 from x2gobroker.loggers import logger_broker, logger_error
 
-class X2GoBrokerWeb(tornado.web.RequestHandler):
+
+class _RequestHandler(tornado.web.RequestHandler):
+    def _handle_request_exception(self, e):
+        logger_error.error('HTTP request error: {error_msg}'.format(error_msg=unicode(e)))
+
+
+class X2GoBrokerWeb(_RequestHandler):
 
     http_header_items = {
         'Content-Type': 'text/plain; charset=utf-8',
diff --git a/x2gobroker/web/uccs.py b/x2gobroker/web/uccs.py
index 2f5864b..b2a17d0 100644
--- a/x2gobroker/web/uccs.py
+++ b/x2gobroker/web/uccs.py
@@ -50,7 +50,12 @@ def credentials_validate(username, password):
     return username, access
 
 
-class X2GoBrokerWeb(tornado.web.RequestHandler):
+class _RequestHandler(tornado.web.RequestHandler):
+    def _handle_request_exception(self, e):
+        logger_error.error('HTTP request error: {error_msg}'.format(error_msg=unicode(e)))
+
+
+class X2GoBrokerWeb(_RequestHandler):
 
     def get(self, path):
         if x2gobroker.defaults.X2GOBROKER_DEBUG:


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list