From d2eb54c4789afa780d72e80d89eb0c738ed61a33 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 6 Jun 2014 12:41:24 -0300 Subject: Move imports to the top. --- src/leap/bitmask/app.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index 65978f72..8d4a12ba 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -48,9 +48,14 @@ from functools import partial from PySide import QtCore, QtGui from leap.bitmask import __version__ as VERSION -from leap.bitmask.util import leap_argparse +from leap.bitmask.gui import locale_rc # noqa - silence pylint +from leap.bitmask.gui.mainwindow import MainWindow from leap.bitmask.logs.utils import get_logger +from leap.bitmask.platform_init.locks import we_are_the_one_and_only from leap.bitmask.services.mail import plumber +from leap.bitmask.util import leap_argparse +from leap.bitmask.util.requirement_checker import check_requirements + from leap.common.events import server as event_server from leap.mail import __version__ as MAIL_VERSION @@ -167,16 +172,6 @@ def main(): nice = os.nice(int(PLAY_NICE)) logger.info("Setting NICE: %s" % nice) - # And then we import all the other stuff - # I think it's safe to import at the top by now -- kali - from leap.bitmask.gui import locale_rc - from leap.bitmask.gui.mainwindow import MainWindow - from leap.bitmask.platform_init.locks import we_are_the_one_and_only - from leap.bitmask.util.requirement_checker import check_requirements - - # pylint: avoid unused import - assert(locale_rc) - # TODO move to a different module: commands? if not we_are_the_one_and_only(): # Bitmask is already running -- cgit v1.2.3