summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-24 11:48:33 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-24 11:52:39 -0300
commit2fc512023f28210dc7957105b49cfdb8878965f9 (patch)
treed6043d9616cff3b70c7bf483bebf3883562558f2 /src/leap
parent394408c3d5d38d04e2135385afcbaa74c0d91450 (diff)
Only ensure server if we are running the app.
This code reorder avoids to get an error message if we run some code when the only thing we want is to get the version. Closes #3914.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/app.py12
1 files changed, 6 insertions, 6 deletions
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.