diff options
-rw-r--r-- | deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py | 2 | ||||
-rw-r--r-- | deluge/ui/Win32IconImagePlugin.py | 4 | ||||
-rw-r--r-- | deluge/ui/console/__init__.py | 5 | ||||
-rw-r--r-- | deluge/ui/console/console.py | 2 | ||||
-rw-r--r-- | deluge/ui/gtkui/options_tab.py | 4 | ||||
-rw-r--r-- | tox.ini | 1 |
6 files changed, 10 insertions, 8 deletions
diff --git a/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py b/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py index 437c13819..b806cb53f 100644 --- a/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py +++ b/deluge/plugins/Blocklist/deluge/plugins/blocklist/common.py @@ -63,7 +63,7 @@ class BadIP(Exception): _message = None def __init__(self, message): - self.message = message + super(BadIP, self).__init__(message) def __set_message(self, message): self._message = message diff --git a/deluge/ui/Win32IconImagePlugin.py b/deluge/ui/Win32IconImagePlugin.py index 7b5cc7735..5e56de798 100644 --- a/deluge/ui/Win32IconImagePlugin.py +++ b/deluge/ui/Win32IconImagePlugin.py @@ -141,7 +141,7 @@ class Win32IcoFile(object): # figure out where AND mask image starts mode = a[0] bpp = 8 - for k in PIL.BmpImagePlugin.BIT2MODE.keys(): + for k in PIL.BmpImagePlugin.BIT2MODE: if mode == PIL.BmpImagePlugin.BIT2MODE[k][1]: bpp = k break @@ -214,7 +214,7 @@ class Win32IcoFile(object): # end Win32IcoFile -class Win32IconImageFile(PIL.ImageFile.ImageFile): +class Win32IconImageFile(PIL.ImageFile.ImageFile): # pylint: disable=abstract-method """ PIL read-only image support for Microsoft .ico files. diff --git a/deluge/ui/console/__init__.py b/deluge/ui/console/__init__.py index 2680ada5f..0ed345853 100644 --- a/deluge/ui/console/__init__.py +++ b/deluge/ui/console/__init__.py @@ -7,10 +7,11 @@ # See LICENSE for more details. # -UI_PATH = __path__[0] # NOQA Ignore 'E402 module level import not at top of file' - from deluge.ui.console.console import Console +UI_PATH = __path__[0] + def start(): + Console().start() diff --git a/deluge/ui/console/console.py b/deluge/ui/console/console.py index c16baa98a..eeec87c9f 100644 --- a/deluge/ui/console/console.py +++ b/deluge/ui/console/console.py @@ -15,7 +15,6 @@ import sys import deluge.common from deluge.ui.baseargparser import BaseArgParser, DelugeTextHelpFormatter -from deluge.ui.console import UI_PATH from deluge.ui.ui import UI log = logging.getLogger(__name__) @@ -87,6 +86,7 @@ class Console(UI): subparsers = self.console_parser.add_subparsers(title=_("Console commands"), help=_("Description"), description=_("The following console commands are available:"), metavar=_("Command"), dest="command") + from deluge.ui.console import UI_PATH # Must import here self.console_cmds = load_commands(os.path.join(UI_PATH, "cmdline", "commands")) for c in sorted(self.console_cmds): self.console_cmds[c].add_subparser(subparsers) diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index 0ee14faf5..485659485 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -172,10 +172,10 @@ class OptionsTab(Tab): if self.spin_max_upload_slots.get_value_as_int() != self.prev_status["max_upload_slots"]: client.core.set_torrent_max_upload_slots( self.prev_torrent_id, self.spin_max_upload_slots.get_value_as_int()) - if (self.chk_prioritize_first_last.get_active() != self.prev_status["prioritize_first_last"]): + if self.chk_prioritize_first_last.get_active() != self.prev_status["prioritize_first_last"]: client.core.set_torrent_prioritize_first_last( self.prev_torrent_id, self.chk_prioritize_first_last.get_active()) - if (self.chk_sequential_download.get_active() != self.prev_status["sequential_download"]): + if self.chk_sequential_download.get_active() != self.prev_status["sequential_download"]: client.core.set_torrent_options( [self.prev_torrent_id], {"sequential_download": self.chk_sequential_download.get_active()}) if self.chk_auto_managed.get_active() != self.prev_status["is_auto_managed"]: @@ -124,6 +124,7 @@ commands = flake8 --exit-zero --max-complexity 15 deluge [testenv:pylint] # Disable site packages to avoid using system installed version sitepackages = False +ignore_errors = True deps = {[testenv]deps} pylint |