mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
[tests] fix flake8 warnings in authproxy.py
This commit is contained in:
parent
fc0176d01e
commit
323d8f61e9
1 changed files with 11 additions and 14 deletions
|
@ -42,9 +42,8 @@ import socket
|
||||||
import time
|
import time
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
USER_AGENT = "AuthServiceProxy/0.1"
|
|
||||||
|
|
||||||
HTTP_TIMEOUT = 30
|
HTTP_TIMEOUT = 30
|
||||||
|
USER_AGENT = "AuthServiceProxy/0.1"
|
||||||
|
|
||||||
log = logging.getLogger("BitcoinRPC")
|
log = logging.getLogger("BitcoinRPC")
|
||||||
|
|
||||||
|
@ -92,11 +91,9 @@ class AuthServiceProxy(object):
|
||||||
# Callables re-use the connection of the original proxy
|
# Callables re-use the connection of the original proxy
|
||||||
self.__conn = connection
|
self.__conn = connection
|
||||||
elif self.__url.scheme == 'https':
|
elif self.__url.scheme == 'https':
|
||||||
self.__conn = http.client.HTTPSConnection(self.__url.hostname, port,
|
self.__conn = http.client.HTTPSConnection(self.__url.hostname, port, timeout=timeout)
|
||||||
timeout=timeout)
|
|
||||||
else:
|
else:
|
||||||
self.__conn = http.client.HTTPConnection(self.__url.hostname, port,
|
self.__conn = http.client.HTTPConnection(self.__url.hostname, port, timeout=timeout)
|
||||||
timeout=timeout)
|
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
if name.startswith('__') and name.endswith('__'):
|
if name.startswith('__') and name.endswith('__'):
|
||||||
|
|
Loading…
Reference in a new issue