Change to Python3 coding style

This commit is contained in:
shortcutme 2019-03-15 21:06:59 +01:00
parent fc0fe0557b
commit b0b9a4d33c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
137 changed files with 910 additions and 913 deletions

View file

@ -3,7 +3,7 @@ import gevent
from Plugin import PluginManager
from Config import config
from Debug import Debug
from domainLookup import lookupDomain
from .domainLookup import lookupDomain
allow_reload = False # No reload supported

View file

@ -1,2 +1,2 @@
import UiRequestPlugin
import SiteManagerPlugin
from . import UiRequestPlugin
from . import SiteManagerPlugin

View file

@ -37,7 +37,7 @@
try:
import http.client as httplib
except ImportError:
import httplib
import http.client
import base64
import decimal
import json
@ -45,7 +45,7 @@ import logging
try:
import urllib.parse as urlparse
except ImportError:
import urlparse
import urllib.parse
USER_AGENT = "AuthServiceProxy/0.1"
@ -83,7 +83,7 @@ class AuthServiceProxy(object):
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
self.__service_url = service_url
self.__service_name = service_name
self.__url = urlparse.urlparse(service_url)
self.__url = urllib.parse.urlparse(service_url)
if self.__url.port is None:
port = 80
else:
@ -106,10 +106,10 @@ class AuthServiceProxy(object):
# 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,
self.__conn = http.client.HTTPSConnection(self.__url.hostname, port,
timeout=timeout)
else:
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
self.__conn = http.client.HTTPConnection(self.__url.hostname, port,
timeout=timeout)
def __getattr__(self, name):

View file

@ -1,4 +1,4 @@
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from .bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time, json, os, sys, re, socket
# Connecting to RPC