diff options
author | DjLegolas <djlegolas@protonmail.com> | 2021-12-25 14:34:49 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-12-28 19:26:38 +0000 |
commit | 897955f0a164349d3191c778cfcb37ee9bff9daf (patch) | |
tree | fd91795cd3fd9a7e226e18e3e14008af3ba03247 /deluge/ui/console/modes/cmdline.py | |
parent | ff309ea4c5009049cdcb0ea876d9a98d84c52e14 (diff) | |
download | deluge-897955f0a164349d3191c778cfcb37ee9bff9daf.tar.gz deluge-897955f0a164349d3191c778cfcb37ee9bff9daf.tar.bz2 deluge-897955f0a164349d3191c778cfcb37ee9bff9daf.zip |
Remove all Python 2 supportdeluge-2.1.0.dev0
* Removed all __future__ imports from code
* Removed all six dependencies
* Removed all future_builtins imports
* Removed all Python 2 related code
Closes: deluge-torrent/deluge#325
Diffstat (limited to 'deluge/ui/console/modes/cmdline.py')
-rw-r--r-- | deluge/ui/console/modes/cmdline.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/deluge/ui/console/modes/cmdline.py b/deluge/ui/console/modes/cmdline.py index 2735168db..680bbdc5a 100644 --- a/deluge/ui/console/modes/cmdline.py +++ b/deluge/ui/console/modes/cmdline.py @@ -8,8 +8,6 @@ # See LICENSE for more details. # -from __future__ import unicode_literals - import logging import os import re @@ -17,7 +15,6 @@ from io import open import deluge.component as component import deluge.configmanager -from deluge.common import PY2 from deluge.decorators import overrides from deluge.ui.console.cmdline.command import Commander from deluge.ui.console.modes.basemode import BaseMode, move_cursor @@ -332,10 +329,10 @@ class CmdLine(BaseMode, Commander): # A key to add to the input string else: - if c > 31 and c < 256: + if 31 < c < 256: # Emulate getwch stroke = chr(c) - uchar = '' if PY2 else stroke + uchar = stroke while not uchar: try: uchar = stroke.decode(self.encoding) |