diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2010-07-29 14:48:10 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2010-07-29 14:48:10 -0700 |
| commit | 93aee19fa2f24c4f9c1fd59c0666e024c6891565 (patch) | |
| tree | a550db51b754b6c1e324045b94a04ceb664f8690 /bin | |
| parent | 251e41ff51178d4485863f716ea1c67725725e20 (diff) | |
Added --fail argument to curl invocations, so that HTTP request fails get surfaced as non-zero exit codes
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-import-canonical-imagestore | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/nova-import-canonical-imagestore b/bin/nova-import-canonical-imagestore index 2e79f09b7..8106cc5ca 100755 --- a/bin/nova-import-canonical-imagestore +++ b/bin/nova-import-canonical-imagestore @@ -59,21 +59,21 @@ def download(img): for f in img['files']: if f['kind'] == 'kernel': dest = os.path.join(tempdir, 'kernel') - subprocess.call(['curl', f['url'], '-o', dest]) + subprocess.call(['curl', '--fail', f['url'], '-o', dest]) kernel_id = image.Image.add(dest, description='kernel/' + img['title'], kernel=True) for f in img['files']: if f['kind'] == 'ramdisk': dest = os.path.join(tempdir, 'ramdisk') - subprocess.call(['curl', f['url'], '-o', dest]) + subprocess.call(['curl', '--fail', f['url'], '-o', dest]) ramdisk_id = image.Image.add(dest, description='ramdisk/' + img['title'], ramdisk=True) for f in img['files']: if f['kind'] == 'image': dest = os.path.join(tempdir, 'image') - subprocess.call(['curl', f['url'], '-o', dest]) + subprocess.call(['curl', '--fail', f['url'], '-o', dest]) ramdisk_id = image.Image.add(dest, description=img['title'], kernel=kernel_id, ramdisk=ramdisk_id) |
