Skip to content

Commit

Permalink
Merge pull request #4929 from xoriole/fix-six-issue2
Browse files Browse the repository at this point in the history
Fixed six 1.11 missing imports issues
  • Loading branch information
qstokkink authored Nov 4, 2019
2 parents ac03233 + 948de80 commit dcea801
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Tribler/Core/Libtorrent/LibtorrentDownloadImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import time
from threading import RLock

from ipv8.util import ensure_text
from ipv8.util import ensure_binary, ensure_text

import libtorrent as lt

from six import ensure_binary, int2byte, text_type
from six import int2byte, text_type

from twisted.internet import reactor
from twisted.internet.defer import CancelledError, Deferred, succeed
Expand Down
2 changes: 1 addition & 1 deletion Tribler/Core/Socks5/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import socket
import struct

from six import ensure_str
from ipv8.util import ensure_str

SOCKS_VERSION = 0x05

Expand Down
4 changes: 3 additions & 1 deletion Tribler/Core/TorrentDef.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import os
from hashlib import sha1

from ipv8.util import ensure_binary

import libtorrent as lt
from libtorrent import bdecode, bencode

from six import binary_type, ensure_binary, integer_types, text_type
from six import binary_type, integer_types, text_type

from Tribler.Core.Utilities import maketorrent
from Tribler.Core.Utilities.torrent_utils import create_torrent_file
Expand Down
4 changes: 3 additions & 1 deletion Tribler/Core/Utilities/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import re
from base64 import b32decode

from ipv8.util import ensure_binary

import libtorrent
from libtorrent import bdecode, bencode

Expand Down Expand Up @@ -77,7 +79,7 @@ def _on_response(response):
raise HttpError(response)

try:
uri = six.ensure_binary(uri)
uri = ensure_binary(uri)
except AttributeError:
pass
try:
Expand Down
2 changes: 1 addition & 1 deletion Tribler/Test/Core/Modules/test_versioncheck.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from six import ensure_binary
from ipv8.util import ensure_binary

from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, maybeDeferred
Expand Down
3 changes: 2 additions & 1 deletion Tribler/Test/Core/Upgrade/test_config_upgrade_70_71.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

from configobj import ConfigObj

from six import ensure_str
from ipv8.util import ensure_str

from six.moves.configparser import RawConfigParser

from Tribler.Core.Config.tribler_config import CONFIG_SPEC_PATH, TriblerConfig
Expand Down

0 comments on commit dcea801

Please sign in to comment.