tests/jenkins.py: remove raw string formatting

This commit is contained in:
Erik Johnson 2015-08-26 23:26:08 -05:00
parent b401328558
commit f4e232bc01

View File

@ -473,7 +473,12 @@ def run(opts):
if bootstrap_minion_version not in version_info[vm_name]:
print('\n\nATTENTION!!!!\n')
print('The boostrapped minion version commit does not contain the desired commit:')
print(' {0!r} does not contain {1!r}'.format(version_info[vm_name], bootstrap_minion_version))
print(
' \'{0}\' does not contain \'{1}\''.format(
version_info[vm_name],
bootstrap_minion_version
)
)
print('\n\n')
sys.stdout.flush()
#if opts.clean and 'JENKINS_SALTCLOUD_VM_NAME' not in os.environ:
@ -482,7 +487,7 @@ def run(opts):
else:
print('matches!')
except ValueError:
print('Failed to load any JSON from {0!r}'.format(outstr))
print('Failed to load any JSON from \'{0}\''.format(outstr))
if opts.cloud_only:
# Run Cloud Provider tests preparation SLS
@ -642,14 +647,14 @@ def run(opts):
remotes_info = json.loads(stdout.strip())
if remotes_info is None or remotes_info[vm_name] is None or opts.test_git_url not in remotes_info[vm_name]:
print('The cloned repository remote is not the desired one:')
print(' {0!r} is not in {1}'.format(opts.test_git_url, remotes_info))
print(' \'{0}\' is not in {1}'.format(opts.test_git_url, remotes_info))
sys.stdout.flush()
if opts.clean and 'JENKINS_SALTCLOUD_VM_NAME' not in os.environ:
delete_vm(opts)
sys.exit(retcode)
print('matches!')
except ValueError:
print('Failed to load any JSON from {0!r}'.format(salt.utils.to_str(stdout).strip()))
print('Failed to load any JSON from \'{0}\''.format(salt.utils.to_str(stdout).strip()))
if opts.test_git_commit is not None:
time.sleep(1)
@ -688,14 +693,14 @@ def run(opts):
revision_info = json.loads(stdout.strip())
if revision_info[vm_name][7:] != opts.test_git_commit[7:]:
print('The cloned repository commit is not the desired one:')
print(' {0!r} != {1!r}'.format(revision_info[vm_name][:7], opts.test_git_commit[:7]))
print(' \'{0}\' != \'{1}\''.format(revision_info[vm_name][:7], opts.test_git_commit[:7]))
sys.stdout.flush()
if opts.clean and 'JENKINS_SALTCLOUD_VM_NAME' not in os.environ:
delete_vm(opts)
sys.exit(retcode)
print('matches!')
except ValueError:
print('Failed to load any JSON from {0!r}'.format(salt.utils.to_str(stdout).strip()))
print('Failed to load any JSON from \'{0}\''.format(salt.utils.to_str(stdout).strip()))
# Run tests here
time.sleep(3)