summaryrefslogtreecommitdiffstats
path: root/deluge/ui/console/console.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 16:15:47 +0000
commitb686174b07bd56af4e5ffaa23c24f27f417fc305 (patch)
tree1ce335620d99341d94e88c159c0b9b0f6f0de5a0 /deluge/ui/console/console.py
parentAdding debian version 2.0.3-4. (diff)
downloaddeluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.tar.xz
deluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.zip
Merging upstream version 2.1.1 (Closes: #1026291).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/ui/console/console.py')
-rw-r--r--deluge/ui/console/console.py15
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):