summaryrefslogtreecommitdiffstats
path: root/deluge/ui/console/modes/addtorrents.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/console/modes/addtorrents.py')
-rw-r--r--deluge/ui/console/modes/addtorrents.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/deluge/ui/console/modes/addtorrents.py b/deluge/ui/console/modes/addtorrents.py
index 6b2c105d9..217b63d85 100644
--- a/deluge/ui/console/modes/addtorrents.py
+++ b/deluge/ui/console/modes/addtorrents.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Arek Stefański <asmageddon@gmail.com>
#
@@ -7,8 +6,6 @@
# See LICENSE for more details.
#
-from __future__ import unicode_literals
-
import logging
import os
from base64 import b64encode
@@ -24,12 +21,6 @@ from deluge.ui.console.utils import format_utils
from deluge.ui.console.widgets.popup import InputPopup, MessagePopup
try:
- from future_builtins import zip
-except ImportError:
- # Ignore on Py3.
- pass
-
-try:
import curses
except ImportError:
pass
@@ -377,7 +368,7 @@ class AddTorrents(BaseMode):
def fail_cb(msg, t_file, ress):
log.debug('failed to add torrent: %s: %s', t_file, msg)
ress['fail'] += 1
- ress['fmsg'].append('{!input!} * %s: {!error!}%s' % (t_file, msg))
+ ress['fmsg'].append(f'{{!input!}} * {t_file}: {{!error!}}{msg}')
if (ress['succ'] + ress['fail']) >= ress['total']:
report_add_status(
component.get('TorrentList'),
@@ -526,9 +517,9 @@ class AddTorrents(BaseMode):
self.last_mark = self.cursel
elif chr(c) == 'j':
- self.scroll_list_up(1)
- elif chr(c) == 'k':
self.scroll_list_down(1)
+ elif chr(c) == 'k':
+ self.scroll_list_up(1)
elif chr(c) == 'M':
if self.last_mark != -1:
if self.last_mark > self.cursel: