diff --git a/drivers/LVHDSR.py b/drivers/LVHDSR.py index 83de1c4c5..be7ddcf18 100755 --- a/drivers/LVHDSR.py +++ b/drivers/LVHDSR.py @@ -560,7 +560,9 @@ def delete(self, uuid): try: lvname = os.path.basename(fileName.replace('-','/').\ replace('//', '-')) - os.unlink(os.path.join(self.path, lvname)) + lpath = os.path.join(self.path, lvname) + if os.path.lexists(lpath): + os.unlink(lpath) except Exception, e: util.SMlog("LVHDSR.delete: failed to remove the symlink for " \ "file %s. Error: %s" % (fileName, str(e)))