summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-06-06 13:00:50 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-06-06 13:00:50 -0300
commit59fb00b65c1fa2813b0751865bd7789e2fbf54f8 (patch)
tree4e9e5191009af3928d8401ba2a20974a7b695fc1 /src
parentacac7e91124d59e6456d74118d144edb52675f95 (diff)
Remove unused variables and reorder arg parsing.
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/app.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index e25ab753..1f20d0d4 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -120,29 +120,16 @@ def main():
"""
Starts the main event loop and launches the main window.
"""
- # TODO move boilerplate outa here!
+ # Parse arguments and store them
_, opts = leap_argparse.init_leapc_args()
do_display_version(opts)
- standalone = opts.standalone
- offline = opts.offline
- bypass_checks = getattr(opts, 'danger', False)
- debug = opts.debug
- logfile = opts.log_file
- mail_logfile = opts.mail_log_file
+ bypass_checks = opts.danger
start_hidden = opts.start_hidden
- replace_stdout = True
- if opts.repair or opts.import_maildir:
- # We don't want too much clutter on the comand mode
- # this could be more generic with a Command class.
- replace_stdout = False
-
- logger = get_logger(debug, logfile, replace_stdout)
-
- flags.STANDALONE = standalone
- flags.OFFLINE = offline
- flags.MAIL_LOGFILE = mail_logfile
+ flags.STANDALONE = opts.standalone
+ flags.OFFLINE = opts.offline
+ flags.MAIL_LOGFILE = opts.mail_log_file
flags.APP_VERSION_CHECK = opts.app_version_check
flags.API_VERSION_CHECK = opts.api_version_check
flags.OPENVPN_VERBOSITY = opts.openvpn_verb
@@ -150,6 +137,14 @@ def main():
flags.CA_CERT_FILE = opts.ca_cert_file
+ replace_stdout = True
+ if opts.repair or opts.import_maildir:
+ # We don't want too much clutter on the comand mode
+ # this could be more generic with a Command class.
+ replace_stdout = False
+
+ logger = get_logger(opts.debug, opts.log_file, replace_stdout)
+
# ok, we got logging in place, we can satisfy mail plumbing requests
# and show logs there. it normally will exit there if we got that path.
do_mail_plumbing(opts)