summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/bitmask/app.py2
-rw-r--r--src/leap/bitmask/util/leap_argparse.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 374c91d2..6a7d6ff1 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -121,7 +121,7 @@ def main():
Starts the main event loop and launches the main window.
"""
# Parse arguments and store them
- _, opts = leap_argparse.init_leapc_args()
+ opts = leap_argparse.get_options()
do_display_version(opts)
bypass_checks = opts.danger
diff --git a/src/leap/bitmask/util/leap_argparse.py b/src/leap/bitmask/util/leap_argparse.py
index 84af4e8d..0717aea5 100644
--- a/src/leap/bitmask/util/leap_argparse.py
+++ b/src/leap/bitmask/util/leap_argparse.py
@@ -123,7 +123,13 @@ def build_parser():
return parser
-def init_leapc_args():
+def get_options():
+ """
+ Get the command line options used when the app was started.
+
+ :return: the command options
+ :rtype: argparse.Namespace
+ """
parser = build_parser()
opts, unknown = parser.parse_known_args()
- return parser, opts
+ return opts