diff options
author | Kali Kaneko <kali@leap.se> | 2015-09-17 22:53:38 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-09-17 22:54:05 -0400 |
commit | 905059dcc203680f86316c83d538f14896adb928 (patch) | |
tree | 3374bb215eacf9bc92840958b48f892a81998525 /src/leap | |
parent | 10f6f5b17e0ac1d5d4b433a428efc1beffd999a7 (diff) |
[style] pep8 fixes
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/app.py | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/eip_status.py | 3 | ||||
-rw-r--r-- | src/leap/bitmask/gui/login.py | 6 | ||||
-rw-r--r-- | src/leap/bitmask/logs/utils.py | 3 | ||||
-rw-r--r-- | src/leap/bitmask/updater.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/util/__init__.py | 3 | ||||
-rw-r--r-- | src/leap/bitmask/util/pastebin.py | 8 |
7 files changed, 19 insertions, 9 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index a2e2aa1a..c9c02b59 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -133,6 +133,7 @@ def log_lsb_release_info(logger): for line in distro_info: logger.info(line) + def fix_qtplugins_path(): # This is a small workaround for a bug in macholib, there is a slight typo # in the path for the qt plugins that is added to the dynamic loader path diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py index 8334c2ee..64a408c4 100644 --- a/src/leap/bitmask/gui/eip_status.py +++ b/src/leap/bitmask/gui/eip_status.py @@ -96,7 +96,8 @@ class EIPStatusWidget(QtGui.QWidget): # Action for the systray self._eip_disabled_action = QtGui.QAction( - u"{0} is {1}".format(self._service_name, self.tr("disabled")), self) + u"{0} is {1}".format( + self._service_name, self.tr("disabled")), self) def connect_backend_signals(self): """ diff --git a/src/leap/bitmask/gui/login.py b/src/leap/bitmask/gui/login.py index 756dd63c..4c2bd9c5 100644 --- a/src/leap/bitmask/gui/login.py +++ b/src/leap/bitmask/gui/login.py @@ -19,10 +19,12 @@ Login widget implementation The login sequence is the following: - _do_login - - backend.provider_setup (check_name_resolution, check_https, download_provider_info) + - backend.provider_setup ( + check_name_resolution, check_https, download_provider_info) - on error: _provider_setup_intermediate - on success: _load_provider_config - - backend.provider_bootstrap (download_ca_cert, check_ca_fingerprint, check_api_certificate) + - backend.provider_bootstrap ( + download_ca_cert, check_ca_fingerprint, check_api_certificate) - on error: _provider_setup_intermediate - on success: _provider_config_loaded - backend.user_login diff --git a/src/leap/bitmask/logs/utils.py b/src/leap/bitmask/logs/utils.py index 683fb542..f709da8b 100644 --- a/src/leap/bitmask/logs/utils.py +++ b/src/leap/bitmask/logs/utils.py @@ -112,7 +112,7 @@ def replace_stdout_stderr_with_logging(logger=None): log.startLogging(sys.stdout) -class QtLogHandler(logbook.Handler, logbook.StringFormatterHandlerMixin): +class QtLogHandler(logbook.Handler, logbook.StringFormatterHandlerMixin): """ Custom log handler which emits a log record with the message properly formatted using a Qt Signal. @@ -186,6 +186,7 @@ class QtLogHandler(logbook.Handler, logbook.StringFormatterHandlerMixin): class _LogController(object): + def __init__(self): self._qt_handler = QtLogHandler(format_string=LOG_FORMAT) self._logbook_controller = None diff --git a/src/leap/bitmask/updater.py b/src/leap/bitmask/updater.py index c35eff5f..7cb23a0a 100644 --- a/src/leap/bitmask/updater.py +++ b/src/leap/bitmask/updater.py @@ -50,6 +50,7 @@ DELAY_KEY = "updater_delay" class Updater(threading.Thread): + def __init__(self): """ Initialize the list of mirrors, paths and other TUF dependencies from @@ -162,7 +163,8 @@ class Updater(threading.Thread): """ Find the remote repo path deneding on the platform. - :return: the path to add to the remote repo url for the specific platform. + :return: the path to add to the remote repo url for the specific + platform. :rtype: str :raises NotImplemented: When the system where bitmask is running is not diff --git a/src/leap/bitmask/util/__init__.py b/src/leap/bitmask/util/__init__.py index 9853803a..b788abd0 100644 --- a/src/leap/bitmask/util/__init__.py +++ b/src/leap/bitmask/util/__init__.py @@ -156,6 +156,7 @@ def flags_to_dict(): return values + def here(module=None): if getattr(sys, 'frozen', False): # we are running in a |PyInstaller| bundle @@ -163,6 +164,6 @@ def here(module=None): else: dirname = os.path.dirname if module: - return dirname(module.__file__) + return dirname(module.__file__) else: return dirname(__file__) diff --git a/src/leap/bitmask/util/pastebin.py b/src/leap/bitmask/util/pastebin.py index a3bdba02..6d50ac9e 100644 --- a/src/leap/bitmask/util/pastebin.py +++ b/src/leap/bitmask/util/pastebin.py @@ -366,7 +366,9 @@ class PastebinAPI(object): Usage Example::
from pastebin import PastebinAPI
x = PastebinAPI()
- details = x.user_details('453a994e0e2f1efae07f8759e59e075b', 'c57a18e6c0ae228cd4bd16fe36da381a')
+ details = x.user_details(
+ '453a994e0e2f1efae07f8759e59e075b',
+ 'c57a18e6c0ae228cd4bd16fe36da381a')
print details
<user>
<user_name>MonkeyPuzzle</user_name>
@@ -486,7 +488,8 @@ class PastebinAPI(object): <paste>
<paste_key>DLiSspYT</paste_key>
<paste_date>1332714730</paste_date>
- <paste_title>Pastebin.py - Python 3.2 Pastebin.com API</paste_title>
+ <paste_title>Pastebin.py -
+ Python 3.2 Pastebin.com API</paste_title>
<paste_size>25300</paste_size>
<paste_expire_date>0</paste_expire_date>
<paste_private>0</paste_private>
@@ -609,7 +612,6 @@ class PastebinAPI(object): def paste(self, api_dev_key, api_paste_code,
api_user_key=None, paste_name=None, paste_format=None,
paste_private=None, paste_expire_date=None):
-
"""Submit a code snippet to Pastebin using the new API.
|