Change in vdsm[master]: fileUtils: Fix bug when mode is not specified
nsoffer at redhat.com
nsoffer at redhat.com
Wed May 6 21:54:16 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: fileUtils: Fix bug when mode is not specified
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.ovirt.org/#/c/36781/4/vdsm/storage/fileUtils.py
File vdsm/storage/fileUtils.py:
Line 145: os.makedirs(*params)
Line 146: except OSError as e:
Line 147: if e.errno != errno.EEXIST:
Line 148: raise
Line 149: statinfo = os.stat(dirPath)
> Not for this patch: I don't think that all this belongs to the except block
Do you mean to move it after the expect block?
try:
make dirs...
except cannot create:
raise
validate existing directory
Line 150: if not stat.S_ISDIR(statinfo.st_mode):
Line 151: raise OSError(errno.ENOTDIR, "Not a directory %s" % dirPath)
Line 152: log.warning("Dir %s already exists", dirPath)
Line 153: if mode is not None:
--
To view, visit https://gerrit.ovirt.org/36781
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I669791fb09ddd18f9b2e6320cf98839ed07aa831
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Candace Sheremeta <cshereme at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list