summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug-3914_unhandled-error-on-version-flag1
-rw-r--r--src/leap/bitmask/app.py12
2 files changed, 7 insertions, 6 deletions
diff --git a/changes/bug-3914_unhandled-error-on-version-flag b/changes/bug-3914_unhandled-error-on-version-flag
new file mode 100644
index 00000000..41e023a0
--- /dev/null
+++ b/changes/bug-3914_unhandled-error-on-version-flag
@@ -0,0 +1 @@
+ o Avoid error message if --version flag is used. Closes #3914.
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 37e67e61..d5132731 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -152,12 +152,6 @@ def main():
"""
Starts the main event loop and launches the main window.
"""
- 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()
if opts.version:
@@ -170,6 +164,12 @@ def main():
logfile = opts.log_file
openvpn_verb = opts.openvpn_verb
+ 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,)
+
#############################################################
# Given how paths and bundling works, we need to delay the imports
# of certain parts that depend on this path settings.