Skip to content

Commit

Permalink
Merge 1818e37 into a11482a
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthv committed Dec 11, 2014
2 parents a11482a + 1818e37 commit 5e9dcad
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/LVHDSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,13 @@ def delete(self, uuid):
try:
lvname = os.path.basename(fileName.replace('-','/').\
replace('//', '-'))
os.unlink(os.path.join(self.path, lvname))
except Exception, e:
util.SMlog("LVHDSR.delete: failed to remove the symlink for " \
"file %s. Error: %s" % (fileName, str(e)))
success = False
lpath = os.path.join(self.path, lvname)
os.unlink(lpath)
except OSError, e:
if e.errno != errno.ENOENT:
util.SMlog("LVHDSR.delete: failed to remove the symlink for " \
"file %s. Error: %s" % (fileName, str(e)))
success = False

if success:
try:
Expand Down

0 comments on commit 5e9dcad

Please sign in to comment.