summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py')
-rw-r--r--src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py b/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
index ae79bf7..6fa6ea4 100644
--- a/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
+++ b/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
@@ -240,10 +240,10 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
if ( (not role or role.lower() == 'collection')
and cimhandle.is_subclass(object_name.namespace,
sub=object_name.classname,
- super='LMI_SystemSoftwareCollection')
- and "InstanceID" in object_name):
- if object_name["InstanceID"] == \
- SystemSoftwareCollection.get_path()["InstanceID"]:
+ super='LMI_SystemSoftwareCollection')):
+ try:
+ SystemSoftwareCollection.check_path(env, object_name,
+ "collection")
pkg_model = pywbem.CIMInstanceName(
classname='LMI_SoftwareIdentity',
namespace="root/cimv2",
@@ -254,6 +254,9 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
model["Member"] = SoftwareIdentity.pkg2model(
pkg_info, model=pkg_model)
yield model
+ except pywbem.CIMError as exc:
+ if exc.args[0] != pywbem.CIM_ERR_NOT_FOUND:
+ raise
if ( (not role or role.lower() == 'member')
and cimhandle.is_subclass(object_name.namespace,