Skip to content

Commit 8f7052a

Browse files
committed
Fix bitcoin.rpc Python3 incompatibility
1 parent 3d1a6a5 commit 8f7052a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bitcoin/rpc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
6969
self.__id_count = 0
7070
authpair = "%s:%s" % (self.__url.username, self.__url.password)
7171
authpair = authpair.encode('utf8')
72-
self.__auth_header = "Basic %s" % base64.b64encode(authpair)
73-
74-
if connection:
75-
# Callables re-use the connection of the original proxy
72+
self.__auth_header = b"Basic " + base64.b64encode(authpair)
73+
74+
if connection:
75+
# Callables re-use the connection of the original proxy
7676
self.__conn = connection
7777
elif self.__url.scheme == 'https':
7878
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,

0 commit comments

Comments
 (0)