diff options
author | Radek Novacek <rnovacek@redhat.com> | 2013-05-16 15:12:10 +0200 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2013-05-16 15:12:10 +0200 |
commit | f5cf34f46ca80050927617ab3e3c2368622a96b6 (patch) | |
tree | 5bc0ca2730378e099c4c7d6bf651a3f15c5f87e4 | |
parent | 9a03faddc11273bb52e10f174558df7399487f09 (diff) | |
download | openlmi-providers-f5cf34f46ca80050927617ab3e3c2368622a96b6.tar.gz openlmi-providers-f5cf34f46ca80050927617ab3e3c2368622a96b6.tar.xz openlmi-providers-f5cf34f46ca80050927617ab3e3c2368622a96b6.zip |
Fix crash in openlmi-cimmof when pegasus is not running
This just fixes the crash, correct solution would be to support registration
without pegasus running.
-rwxr-xr-x | openlmi-cimmof | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openlmi-cimmof b/openlmi-cimmof index cbec8d4..4f4ccaa 100755 --- a/openlmi-cimmof +++ b/openlmi-cimmof @@ -79,6 +79,8 @@ def get_objects_from_mofs(cimmof, namespace, *mofs): process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=sys.stderr) (out, _) = process.communicate(mof.read()) + if len(out.strip()) == 0: + die("%s returned empty string, is Pegasus running?" % cimmof) parsed_dom = dom.parseString(xml_cleanup(out)) # we cannot use pywbem.parse_cim because it does not support # DECLARATION element, but we can parse individual values |