Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import shlex
- def check_process(command, output):
- ok = False
- try:
- out = subprocess.check_output(shlex.split(command), stderr=subprocess.STDOUT, shell=False)
- if out.find(output) > -1:
- ok = True
- except BaseException as e:
- print(e.output)
- ok = False
- return ok
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement