| |
@@ -30,7 +30,7 @@
|
| |
else:
|
| |
data = list(opts.subjects, opts.docker_extra_args)
|
| |
sys.stdout.write(json.dumps(data, indent=4, separators=(',', ': ')))
|
| |
- except RuntimeError, ex:
|
| |
+ except RuntimeError as ex:
|
| |
sys.stderr.write("{0}: {1}\n".format(os.path.basename(sys.argv[0]), str(ex)))
|
| |
return 1
|
| |
|
| |
@@ -81,7 +81,7 @@
|
| |
]
|
| |
try:
|
| |
subprocess.check_call(cmd, stdout=sys.stderr.fileno())
|
| |
- except subprocess.CalledProcessError, ex:
|
| |
+ except subprocess.CalledProcessError as ex:
|
| |
raise RuntimeError("Could not start docker service")
|
| |
|
| |
# And launch the actual container
|
| |
@@ -92,7 +92,7 @@
|
| |
]
|
| |
try:
|
| |
subprocess.check_call(cmd, stdout=sys.stderr.fileno())
|
| |
- except subprocess.CalledProcessError, ex:
|
| |
+ except subprocess.CalledProcessError as ex:
|
| |
raise RuntimeError("Could not start container image: {0}".format(image))
|
| |
|
| |
# Read out the container environment variable
|
| |
@@ -113,7 +113,7 @@
|
| |
]
|
| |
try:
|
| |
subprocess.check_call(install, stdout=sys.stderr.fileno())
|
| |
- except subprocess.CalledProcessError, ex:
|
| |
+ except subprocess.CalledProcessError as ex:
|
| |
raise RuntimeError("Could not install Ansible dependencies in launched container")
|
| |
|
| |
# Directory to place artifacts
|
| |