python-modernize -f libmodernize.fixes.fix_imports_six

This commit is contained in:
Tomas Kopecek 2017-05-03 11:32:38 +02:00
parent 73356b50e5
commit b1da150c01
28 changed files with 101 additions and 101 deletions

View file

@ -27,13 +27,13 @@
# in a cygwin shell.
from optparse import OptionParser
from ConfigParser import ConfigParser
from six.moves.configparser import ConfigParser
import os
import subprocess
import sys
import tempfile
import time
import xmlrpclib
import six.moves.xmlrpc_client
import base64
import hashlib
import logging
@ -586,13 +586,13 @@ def get_mgmt_server():
macaddr, gateway = find_net_info()
logger.debug('found MAC address %s, connecting to %s:%s',
macaddr, gateway, MANAGER_PORT)
server = xmlrpclib.ServerProxy('http://%s:%s/' %
server = six.moves.xmlrpc_client.ServerProxy('http://%s:%s/' %
(gateway, MANAGER_PORT), allow_none=True)
# we would set a timeout on the socket here, but that is apparently not
# supported by python/cygwin/Windows
task_port = server.getPort(macaddr)
logger.debug('found task-specific port %s', task_port)
return xmlrpclib.ServerProxy('http://%s:%s/' % (gateway, task_port), allow_none=True)
return six.moves.xmlrpc_client.ServerProxy('http://%s:%s/' % (gateway, task_port), allow_none=True)
def get_options():
"""handle usage and parse options"""