[X2Go-Commits] [x2gobroker] 07/07: bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013).

git-admin at x2go.org git-admin at x2go.org
Thu Sep 13 15:26:37 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit c3067f00df60d43ebbbecf5dd6f0f8da3c4221e4
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Sep 13 15:26:01 2018 +0200

    bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013).
---
 bin/x2gobroker   | 6 +++++-
 debian/changelog | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/x2gobroker b/bin/x2gobroker
index 47649f1..bf3dfa9 100755
--- a/bin/x2gobroker
+++ b/bin/x2gobroker
@@ -294,7 +294,11 @@ if __name__ == "__main__":
             else:
                 # run without https
                 http_server = tornado.httpserver.HTTPServer(application)
-            http_server.listen(bind_port, address=bind_address)
+            try:
+                http_server.listen(bind_port, address=bind_address)
+            except OSError as e:
+                print (e)
+                sys.exit(1)
 
             if CAN_DAEMONIZE and cmdline_args.daemonize:
                 atexit.register(cleanup_on_exit)
diff --git a/debian/changelog b/debian/changelog
index fc33189..7217c4f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -75,6 +75,8 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium
       install into x2gobroker bin:pkg (on DEB based systems).
     - Makefile.docupload: Add apidoc target (running sphinx-apidoc).
     - docs/source: Initialize Sphinx API documentation's .rst files.
+    - bin/x2gobroker: If binding the http server fails, a non-zero exit code
+      should be returned. (Fixes: #1013).
   * debian/*:
     + Trigger Makefile's install target and install those files. Drop debhelper
       from-source-installation magic.

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list