diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py index cd2f9b1751..51dbd8a2f7 100644 --- a/salt/cloud/clouds/ec2.py +++ b/salt/cloud/clouds/ec2.py @@ -1744,12 +1744,12 @@ def query_instance(vm_=None, call=None): attempts = 5 while attempts > 0: - data, requesturl = aws.query(params, + data, requesturl = aws.query(params, # pylint: disable=W0632 location=location, provider=provider, opts=__opts__, return_url=True, - sigver='4') # pylint: disable=W0632 + sigver='4') log.debug('The query returned: {0}'.format(data)) if isinstance(data, dict) and 'error' in data: @@ -3223,12 +3223,12 @@ def _toggle_delvol(name=None, instance_id=None, device=None, volume_id=None, else: params = {'Action': 'DescribeInstances', 'InstanceId.1': instance_id} - data, requesturl = aws.query(params, + data, requesturl = aws.query(params, # pylint: disable=W0632 return_url=True, location=get_location(), provider=get_provider(), opts=__opts__, - sigver='4') # pylint: disable=W0632 + sigver='4') blockmap = data[0]['instancesSet']['item']['blockDeviceMapping'] diff --git a/salt/fileclient.py b/salt/fileclient.py index 0325d7c4e5..c6e07a960b 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -26,17 +26,12 @@ import salt.fileserver import salt.utils import salt.utils.templates import salt.utils.gzip_util +from salt.utils.openstack.swift import SaltSwift # pylint: disable=no-name-in-module,import-error import salt.ext.six.moves.BaseHTTPServer as BaseHTTPServer from salt.ext.six.moves.urllib.error import HTTPError, URLError from salt.ext.six.moves.urllib.parse import urlparse, urlunparse -from salt.ext.six.moves.urllib.request import ( - HTTPPasswordMgrWithDefaultRealm as url_passwd_mgr, - HTTPBasicAuthHandler as url_auth_handler, - build_opener as url_build_opener, - install_opener as url_install_opener -) # pylint: enable=no-name-in-module,import-error log = logging.getLogger(__name__) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index c455bef65e..dc47ad49a8 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -705,7 +705,8 @@ def validate_windows_cred(host, username='Administrator', password=None, retries retcode = win_cmd('winexe -U {0}%{1} //{2} "hostname"'.format( username, password, host )) - if retcode == 0: break + if retcode == 0: + break time.sleep(1) return retcode == 0