summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/app.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-04-07 11:09:05 -0400
committerKali Kaneko <kali@leap.se>2016-04-07 11:09:05 -0400
commit42e4458f3f37d50725a37a7e22835ab677cc24aa (patch)
tree3b4b69a948d7ca23f4031abcffea0d08dfc21b49 /src/leap/bitmask/app.py
parentdadfb03b90d099d50c7c225da297952cdfb7b9aa (diff)
[style] pep8
Diffstat (limited to 'src/leap/bitmask/app.py')
-rw-r--r--src/leap/bitmask/app.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 0c4c32e2..0ae60e48 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -46,11 +46,7 @@ import os
import platform
import sys
-if platform.system() == "Darwin":
- # We need to tune maximum number of files, due to zmq usage
- # we hit the limit.
- import resource
- resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 10240))
+import psutil
from leap.bitmask import __version__ as VERSION
from leap.bitmask.backend.backend_proxy import BackendProxy
@@ -70,7 +66,12 @@ from leap.mail import __version__ as MAIL_VERSION
import codecs
codecs.register(lambda name: codecs.lookup('utf-8')
if name == 'cp65001' else None)
-import psutil
+
+if platform.system() == "Darwin":
+ # We need to tune maximum number of files, due to zmq usage
+ # we hit the limit.
+ import resource
+ resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 10240))
def kill_the_children():
@@ -226,9 +227,10 @@ def start_app():
backend_pid = None
if not backend_running:
frontend_pid = os.getpid()
- backend_process = multiprocessing.Process(target=run_backend,
- name='Backend',
- args=(opts.danger, flags_dict, frontend_pid))
+ backend_process = multiprocessing.Process(
+ target=run_backend,
+ name='Backend',
+ args=(opts.danger, flags_dict, frontend_pid))
# we don't set the 'daemon mode' since we need to start child processes
# in the backend
# backend_process.daemon = True