diff options
Diffstat (limited to 'deluge/ui/console/console.py')
-rw-r--r-- | deluge/ui/console/console.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/deluge/ui/console/console.py b/deluge/ui/console/console.py index 58d31d5..8ef87e8 100644 --- a/deluge/ui/console/console.py +++ b/deluge/ui/console/console.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> @@ -7,8 +6,6 @@ # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # -from __future__ import print_function, unicode_literals - import fnmatch import logging import os @@ -53,7 +50,7 @@ def load_commands(command_dir): return dict(commands) -class LogStream(object): +class LogStream: out = sys.stdout def write(self, data): @@ -68,9 +65,7 @@ class Console(UI): cmd_description = """Console or command-line user interface""" def __init__(self, *args, **kwargs): - super(Console, self).__init__( - 'console', *args, log_stream=LogStream(), **kwargs - ) + super().__init__('console', *args, log_stream=LogStream(), **kwargs) group = self.parser.add_argument_group( _('Console Options'), @@ -112,9 +107,9 @@ class Console(UI): ) # To properly print help message for the console commands ( e.g. deluge-console info -h), # we add a subparser for each command which will trigger the help/usage when given - from deluge.ui.console.parser import ( + from deluge.ui.console.parser import ( # import here because (see top) ConsoleCommandParser, - ) # import here because (see top) + ) self.console_parser = ConsoleCommandParser( parents=[self.parser], @@ -150,7 +145,7 @@ class Console(UI): self.console_parser.subcommand = False self.parser.subcommand = False if i == -1 else True - super(Console, self).start(self.console_parser) + super().start(self.console_parser) from deluge.ui.console.main import ConsoleUI # import here because (see top) def run(options): |