]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make sure we don't double remove tmp on exception
authorVishvananda Ishaya <vishvananda@gmail.com>
Thu, 20 Dec 2012 21:43:09 +0000 (13:43 -0800)
committerVishvananda Ishaya <vishvananda@gmail.com>
Thu, 20 Dec 2012 21:49:47 +0000 (13:49 -0800)
commitcbcd340c67c914e38342471c8a1a0aba984c15ff
tree2b04f9392059423a749de912e6e610998feabc84
parent3b02985805a1442c97edb119ec01c013f3ab36cb
Make sure we don't double remove tmp on exception

The fetch_to_raw code would fail if an exception is thrown during
fetch because it would attempt to delete the same file twice.

Fix this by using mkstemp and our wrapper which only deletes the
tmp file if it exists.

Change-Id: I7bb3171d3c7dc023fc743578c2ce6e804bbc49f5
cinder/image/image_utils.py