Change in vdsm[master]: configurator.py: fix _removeFile to do as described in it's ...

mtayer at redhat.com mtayer at redhat.com
Sun Jun 22 11:55:48 UTC 2014


mooli tayer has posted comments on this change.

Change subject: configurator.py: fix _removeFile to do as described in it's doc string.
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/28782/5//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: configurator.py: fix _removeFile to do as described in it's doc string.
Line 8: 
Line 9: Remove file in a non racy way without using the utils.rmFile()
Line 10: This method assumes the file exists.
> This -> which
Fixed 
"... utils.rmFile() which assumes ..."
Line 11: 
Line 12: Change-Id: I0436832ae63891c097038ef2b76606c30c40328a
Line 13: https://bugzilla.redhat.com/show_bug.cgi?id=1109569


http://gerrit.ovirt.org/#/c/28782/5/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:

Line 326:             os.unlink(content['path'])
Line 327:         except OSError as e:
Line 328:             if e.errno != errno.ENOENT:
Line 329:                 raise InvalidRun("Removing file: %s failed", content['path'])
Line 330: 
So should I go with :
if e.errno != errno.ENOENT:
    raise InvalidRun("Removing file: %s failed",content['path'],err=e)
Line 331:     def _unprefixAndRemoveSection(self, path):
Line 332:         """
Line 333:         undo changes done by _prefixAndPrepend.
Line 334:         """


-- 
To view, visit http://gerrit.ovirt.org/28782
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0436832ae63891c097038ef2b76606c30c40328a
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list