Yeela Kaplan has uploaded a new change for review. Change subject: misc: use utils.persist/unpersist instead of execcmd ......................................................................
misc: use utils.persist/unpersist instead of execcmd Change-Id: Iab3e43b3f55ff562c35ceaf6ff83cf48119842be Signed-off-by: Yeela Kaplan <[email protected]> --- M vdsm/storage/misc.py 1 file changed, 4 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/34076/1 diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py index 7eb299c..acd64c7 100644 --- a/vdsm/storage/misc.py +++ b/vdsm/storage/misc.py @@ -480,10 +480,8 @@ newName = os.path.join(directory, fd[key]['new']) if utils.isOvirtNode() and persist and not cp: try: - execCmd([constants.EXT_UNPERSIST, oldName], - sudo=True) - execCmd([constants.EXT_UNPERSIST, newName], - sudo=True) + utils.unpersist(oldName) + utils.unpersist(newName) except: pass try: @@ -491,8 +489,7 @@ execCmd([constants.EXT_CP, oldName, newName], sudo=True) if (utils.isOvirtNode() and persist and not os.path.exists(newName)): - execCmd([constants.EXT_PERSIST, newName], - sudo=True) + utils.persist(newName) else: os.rename(oldName, newName) @@ -500,8 +497,7 @@ pass if utils.isOvirtNode() and persist and not cp: try: - execCmd([constants.EXT_PERSIST, newName], - sudo=True) + utils.persist(newName) except: pass -- To view, visit http://gerrit.ovirt.org/34076 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab3e43b3f55ff562c35ceaf6ff83cf48119842be Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
