pep-8 fix

This commit is contained in:
Joseph Hall 2012-11-20 20:30:14 +00:00
parent 6a96be86b6
commit 0dd50bba21
7 changed files with 7 additions and 7 deletions

View File

@ -215,7 +215,7 @@ def create(vm_):
if saltcloud.utils.wait_for_passwd(host=ip_address, username=user, timeout=60, key_filename=__opts__['AWS.private_key']): if saltcloud.utils.wait_for_passwd(host=ip_address, username=user, timeout=60, key_filename=__opts__['AWS.private_key']):
username = user username = user
break break
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
deploy_command='bash /tmp/deploy.sh' deploy_command='bash /tmp/deploy.sh'
if username == 'root': if username == 'root':
deploy_command='/tmp/deploy.sh' deploy_command='/tmp/deploy.sh'

View File

@ -95,7 +95,7 @@ def create(vm_):
sys.stderr.write(err) sys.stderr.write(err)
log.error(err) log.error(err)
return False return False
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
deployed = saltcloud.utils.deploy_script( deployed = saltcloud.utils.deploy_script(
host=data.public_ips[0], host=data.public_ips[0],
username='root', username='root',

View File

@ -128,7 +128,7 @@ def create(vm_):
not_ready = False not_ready = False
time.sleep(15) time.sleep(15)
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
log.debug('Deploying {0} using IP address {1}'.format(vm_['name'], data.public_ips[0])) log.debug('Deploying {0} using IP address {1}'.format(vm_['name'], data.public_ips[0]))
deployed = saltcloud.utils.deploy_script( deployed = saltcloud.utils.deploy_script(
host=data.public_ips[0], host=data.public_ips[0],

View File

@ -93,7 +93,7 @@ def create(vm_):
) )
log.error(err) log.error(err)
return False return False
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
if saltcloud.utils.wait_for_ssh(data.public_ips[0]): if saltcloud.utils.wait_for_ssh(data.public_ips[0]):
cmd = ('ssh -oStrictHostKeyChecking=no -t -i {0} {1}@{2} ' cmd = ('ssh -oStrictHostKeyChecking=no -t -i {0} {1}@{2} '
'"{3}"').format( '"{3}"').format(

View File

@ -118,7 +118,7 @@ def create(vm_):
log.error(err) log.error(err)
return False return False
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
deployed = saltcloud.utils.deploy_script( deployed = saltcloud.utils.deploy_script(
host=data.public_ips[0], host=data.public_ips[0],
username='root', username='root',

View File

@ -239,7 +239,7 @@ def create(vm_):
deployargs['sudo'] = vm_['sudo'] deployargs['sudo'] = vm_['sudo']
log.debug('Running root commands using sudo') log.debug('Running root commands using sudo')
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
deployed = saltcloud.utils.deploy_script(**deployargs) deployed = saltcloud.utils.deploy_script(**deployargs)
if deployed: if deployed:
log.info('Salt installed on {0}'.format(vm_['name'])) log.info('Salt installed on {0}'.format(vm_['name']))

View File

@ -162,7 +162,7 @@ def create(vm_):
if not ip_address: if not ip_address:
raise raise
if __opts__['deploy'] == True: if __opts__['deploy'] is True:
deployed = saltcloud.utils.deploy_script( deployed = saltcloud.utils.deploy_script(
host=ip_address, host=ip_address,
username='root', username='root',