[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.1.0-39-g5b88443

X2Go dev team git-admin at x2go.org
Fri Apr 26 00:53:17 CEST 2013


The branch, master has been updated
       via  5b884430d73643ab81fc0aac11f22e52be8706ee (commit)
      from  3fd14f204a2f570d88c95b455fdcffd57b99ed4e (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2gobroker/web/plain.py |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index c4deb42..8487e43 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -58,9 +58,14 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
 
         # silence pyflakes...
         broker_backend = None
-        # dynamically detect broker backend from given URL
-        exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
-        exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
+        try:
+            # dynamically detect broker backend from given URL
+            exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
+            exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
+        except ImportError:
+            # throw a 404 if the backend does not exist
+            raise tornado.web.HTTPError(404)
+
         global_config = broker_backend.get_global_config()
 
         # if the broker backend is disabled in the configuration, pretend to have nothing on offer


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