Zhou Zheng Sheng has posted comments on this change. Change subject: vdsm-tool: add service management utilities ......................................................................
Patch Set 3: (1 inline comment) .................................................... File lib/vdsm/tool/service.py Line 29: from vdsm.tool import expose Line 30: from vdsm.utils import CommandPath Line 31: Line 32: Line 33: def execCmd(argv): Thanks Yaniv and Dan. utils.execCmd is actually storage.misc.exeCmd, and /usr/share/vdsm is not in the PYTHONPATH when vdsm-tool is running, so when it calls utils.exeCmd, it will fail. That's why I re-implement a simple version here. If I want to change the PYTHONPATH, I have to firstly turn vdsm-tool from a Python source file to a shell script, then add /usr/share/vdsm to PYTHONPATH and invoke vdsm-tool. Another way is to add /usr/share/vdsm to sys.path. I have a memory that Dan commented on one of my older patch and said he dislikes modifying sys.path. Do you think I should change the PYTHONPATH and turn vdsm-tool into a shell script? Line 34: p = subprocess.Popen(argv, stdout=subprocess.PIPE, Line 35: stderr=subprocess.PIPE) Line 36: out, err = p.communicate() Line 37: rc = p.returncode -- To view, visit http://gerrit.ovirt.org/13701 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd1cbcf5fd00bb1ec73c5970be012e294b3b4c55 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
