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:
parent
7d4317bd40
commit
d2c10b2a70
@ -67,6 +67,10 @@ def main():
|
|||||||
|
|
||||||
(options, args) = parser.parse_args()
|
(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)
|
p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE)
|
||||||
counters = p.communicate()[0]
|
counters = p.communicate()[0]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user