From 0cab909f9518273d95e371e5fb1061fb9b0a92fd Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 2 Jul 2014 12:52:31 -0300 Subject: Send the flag module values to the processes. Add serialize/deserialize to dict helper. --- src/leap/bitmask/backend_app.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/backend_app.py') diff --git a/src/leap/bitmask/backend_app.py b/src/leap/bitmask/backend_app.py index bd3b8a1f..d4815d82 100644 --- a/src/leap/bitmask/backend_app.py +++ b/src/leap/bitmask/backend_app.py @@ -17,11 +17,22 @@ import signal from leap.bitmask.backend.leapbackend import LeapBackend +from leap.bitmask.util import dict_to_flags -def run_backend(bypass_checks=False): +def run_backend(bypass_checks, flags_dict): + """ + Run the backend for the application. + + :param bypass_checks: whether we should bypass the checks or not + :type bypass_checks: bool + :param flags_dict: a dict containing the flag values set on app start. + :type flags_dict: dict + """ # Ensure that the application quits using CTRL-C signal.signal(signal.SIGINT, signal.SIG_DFL) + dict_to_flags(flags_dict) + backend = LeapBackend(bypass_checks=bypass_checks) backend.run() -- cgit v1.2.3