Change in vdsm[master]: vdsm-tool: unify ad-hoc execCmd implementations

ybronhei at redhat.com ybronhei at redhat.com
Tue Apr 23 11:35:10 UTC 2013


Yaniv Bronhaim has posted comments on this change.

Change subject: vdsm-tool: unify ad-hoc execCmd implementations
......................................................................


Patch Set 2: (4 inline comments)

....................................................
File lib/vdsm/tool/__init__.py
Line 50:             modules.add(base)
Line 51:     return sorted(modules)
Line 52: 
Line 53: 
Line 54: def load_modules():
should also start with underscore
Line 55:     """
Line 56:     Dynamically load the modules present in the tool package.
Line 57: 
Line 58:     This means that vdsm-tool doesn't need to know in advance the modules


Line 115:     for cmd_name, cmd_docs in mod_desc:
Line 116:         _usage_command(cmd_name, cmd_docs)
Line 117: 
Line 118: 
Line 119: def usage_and_exit(exit_code):
should also start with underscore
Line 120:     print "Usage: %s [options] <action> [arguments]\n" % sys.argv[0]
Line 121: 
Line 122:     print "Valid options:"
Line 123:     print "  -h, --help"


....................................................
File lib/vdsm/tool/load_needed_modules.py.in
Line 27: def _exec_command(argv):
Line 28:     """
Line 29:     This function executes a given shell command.
Line 30:     """
Line 31:     rc, out, err = execCmd(argv, raw=True)
you don't use out, so why raw=True?
Line 32:     if rc != 0:
Line 33:         raise Exception("Execute command %s failed: %s" % (argv, err))
Line 34: 
Line 35: 


....................................................
File vdsm-tool/vdsm-tool.in
Line 1: #!/usr/bin/python
add a copyright
Line 2: import sys
Line 3: 
Line 4: from vdsm import tool
Line 5: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ca64ec5dbfebe5c5090ec8fac46785a538b79d3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud at kohlvanwijngaarden.nl>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list