Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify if ipmitool are installed before the execution starts #3

Open
rpsene opened this issue May 19, 2017 · 1 comment
Open

Verify if ipmitool are installed before the execution starts #3

rpsene opened this issue May 19, 2017 · 1 comment
Assignees

Comments

@rpsene
Copy link

rpsene commented May 19, 2017

import subprocess

def cmd_exists(command):
    '''check if a command exists'''
    subp = subprocess.call("type " + command, shell=True,
                           stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    return subp == 0
@Guilhermeslucas
Copy link
Contributor

Guilhermeslucas commented Jun 7, 2017

Done! Opened a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants