diff options
author | DjLegolas <djlegolas@protonmail.com> | 2021-12-25 13:34:49 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-12-28 20:26:38 +0100 |
commit | 897955f0a164349d3191c778cfcb37ee9bff9daf (patch) | |
tree | fd91795cd3fd9a7e226e18e3e14008af3ba03247 /msgfmt.py | |
parent | [GtkUI] Fix ETA sorting to match WebUI (diff) | |
download | deluge-897955f0a164349d3191c778cfcb37ee9bff9daf.tar.xz 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 'msgfmt.py')
-rwxr-xr-x | msgfmt.py | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -25,8 +25,6 @@ Options: --version Display version information and exit. """ -from __future__ import print_function, unicode_literals - import array import ast import getopt @@ -103,10 +101,7 @@ def generate(): 0, 0, ) # size and offset of hash table - if sys.version_info.major == 2: - output += array.array(b'i', offsets).tostring() - else: - output += array.array('i', offsets).tobytes() + output += array.array('i', offsets).tobytes() output += ids.encode('utf8') output += strs.encode('utf8') return output @@ -181,9 +176,6 @@ def make(filename, outfile): if not line: continue line = ast.literal_eval(line) - # Python 2 ast.literal_eval returns bytes. - if isinstance(line, bytes): - line = line.decode('utf8') if section == section_id: msgid += line elif section == section_str: |