mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 4 additions and 0 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue