Add a reasonable error message telling the caller to specify a program

to be executed under hwpmc.  If there is no program to run then
exit.
This commit is contained in:
George V. Neville-Neil 2012-09-04 20:14:37 +00:00
parent 7d4317bd40
commit d2c10b2a70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240101

View File

@ -67,6 +67,10 @@ def main():
(options, args) = parser.parse_args()
if (options.program == None):
print "specify program, such as ls, with -p/--program"
sys.exit()
p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE)
counters = p.communicate()[0]