From 9f3e9eee381fe68b3e8c28fe4a0dec45e4e80488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 1 Aug 2013 16:05:39 -0300 Subject: Fail gracefully when the events server fails to start --- changes/bug_fail_gracefully_events | 2 ++ src/leap/app.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changes/bug_fail_gracefully_events diff --git a/changes/bug_fail_gracefully_events b/changes/bug_fail_gracefully_events new file mode 100644 index 00000000..dbd6f594 --- /dev/null +++ b/changes/bug_fail_gracefully_events @@ -0,0 +1,2 @@ + o Fail gracefully when the events port 8090 is in use by something + else. Fixes #3276. \ No newline at end of file diff --git a/src/leap/app.py b/src/leap/app.py index f45e46c4..6ba27813 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -131,7 +131,11 @@ def main(): """ Starts the main event loop and launches the main window. """ - event_server.ensure_server(event_server.SERVER_PORT) + try: + event_server.ensure_server(event_server.SERVER_PORT) + except Exception as e: + # We don't even have logger configured in here + print "Could not ensure server: %r" % (e,) _, opts = leap_argparse.init_leapc_args() standalone = opts.standalone -- cgit v1.2.3