Message ID | 1278251117-31220-1-git-send-email-mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 0372565..a57a334 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -322,6 +322,15 @@ def env_unregister_vm(env, name): # Utility functions for dealing with external processes +def find_command(cmd): + for dir in ["/usr/local/sbin", "/usr/local/bin", + "/usr/sbin", "/usr/bin", "/sbin", "/bin"]: + file = os.path.join(dir, cmd) + if os.path.exists(file): + return file + raise ValueError('Missing command: %s' % cmd) + + def pid_exists(pid): """ Return True if a given PID exists.