Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions bitcoinrpc/authproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import http.client as httplib
except ImportError:
import httplib
import sys
import base64
import json
import decimal
Expand Down Expand Up @@ -89,12 +90,18 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
# Callables re-use the connection of the original proxy
self.__conn = connection
elif self.__url.scheme == 'https':
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
None, None, False,
timeout)
if sys.version_info < (3, 4):
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
None, None, False, timeout)
else:
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
None, None, timeout)
else:
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
False, timeout)
if sys.version_info < (3, 4):
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
False, timeout)
else:
self.__conn = httplib.HTTPConnection(self.__url.hostname, port, timeout)

def __getattr__(self, name):
if name.startswith('__') and name.endswith('__'):
Expand Down