[node-patches] Change in ovirt-node[master]: utils_fs: add ismount isbindmount python implementation
dougsland at redhat.com
dougsland at redhat.com
Wed Jul 2 17:43:51 UTC 2014
Douglas Schilling Landgraf has posted comments on this change.
Change subject: utils_fs: add ismount isbindmount python implementation
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
http://gerrit.ovirt.org/#/c/29519/1/src/ovirt/node/utils/fs/mount.py
File src/ovirt/node/utils/fs/mount.py:
Line 83: elif os.path.isdir(path):
Line 84: return os.path.ismount(path)
Line 85: else: # os.path.ismount does not operate with file mount points
Line 86: path = os.path.abspath(path)
Line 87: return any(entry for entry in _entries() if entry.mount_point == path)
I would try to use directly os.path.abspath(path), no need to reassign the var.
Line 88:
Line 89:
Line 90: def isbindmount(path):
Line 91: path = os.path.abspath(path)
Line 89:
Line 90: def isbindmount(path):
Line 91: path = os.path.abspath(path)
Line 92: return any(entry for entry in _entries() if
Line 93: entry.mount_point == path and entry.root != '/')
the same as above.
Line 94:
Line 95:
Line 96: def mount(source, target, fstype='', flags=0L, data=None):
Line 97: """Mount a filesystem source to the target of type fstype"""
--
To view, visit http://gerrit.ovirt.org/29519
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I92e3b9368f795bda587d5de1d61a3a0266038d8f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: 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: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the node-patches
mailing list