]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace os.unlink with delete_if_exists
authorJohn Griffith <john.griffith@solidfire.com>
Thu, 15 Aug 2013 02:06:05 +0000 (20:06 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 15 Aug 2013 02:08:38 +0000 (20:08 -0600)
commit6dc2193813d1e8ee951288c5386296b0a2a5e7b9
treec6e2ca39d3ba1c89992c74fa2646a4a6118ce90c
parent774a1775e977b01dc039476f4b61d560e5fc1822
Replace os.unlink with delete_if_exists

Shouldn't care when doing unlink on our temp files
if they exist or not.  In fact this causes problems
when you do things like with tempfile/dir and happen
to try and unlink after it's already been removed.

This replaces these calls with the safer
common.fileutils.delete_if_exists which will
ignore the os exception of the object DNE.

Fixes bug: 1212502

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