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/cmdline/commands/add.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/cmdline/commands/add.py')
-rw-r--r-- | deluge/ui/console/cmdline/commands/add.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/deluge/ui/console/cmdline/commands/add.py b/deluge/ui/console/cmdline/commands/add.py index da42695b5..b1d08cee3 100644 --- a/deluge/ui/console/cmdline/commands/add.py +++ b/deluge/ui/console/cmdline/commands/add.py @@ -8,10 +8,10 @@ # See LICENSE for more details. # -from __future__ import unicode_literals - import os from base64 import b64encode +from urllib.parse import urlparse +from urllib.request import url2pathname from twisted.internet import defer @@ -21,14 +21,6 @@ from deluge.ui.client import client from . import BaseCommand -try: - from urllib.parse import urlparse - from urllib.request import url2pathname -except ImportError: - # PY2 fallback - from urllib import url2pathname # pylint: disable=ungrouped-imports - from urlparse import urlparse # pylint: disable=ungrouped-imports - class Command(BaseCommand): """Add torrents""" |