Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91932da

Browse files
committed
#13973: move a couple of imports at module level. Patch by Tshepang Lekhonkhobe.
1 parent 2fe4bb1 commit 91932da

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/xmlrpc/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
import time
133133
from datetime import datetime
134134
import http.client
135+
import urllib.parse
135136
from xml.parsers import expat
136137
import socket
137138
import errno
@@ -1190,7 +1191,6 @@ def get_host_info(self, host):
11901191
if isinstance(host, tuple):
11911192
host, x509 = host
11921193

1193-
import urllib.parse
11941194
auth, host = urllib.parse.splituser(host)
11951195

11961196
if auth:
@@ -1383,7 +1383,6 @@ def __init__(self, uri, transport=None, encoding=None, verbose=False,
13831383
# establish a "logical" server connection
13841384

13851385
# get the url
1386-
import urllib.parse
13871386
type, uri = urllib.parse.splittype(uri)
13881387
if type not in ("http", "https"):
13891388
raise IOError("unsupported XML-RPC protocol")

0 commit comments

Comments
 (0)