diff options
author | Michal Minar <miminar@redhat.com> | 2013-03-26 10:45:53 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-03-26 11:58:07 +0100 |
commit | c3c0fe84506667805b54d845370c77b0ac7328c7 (patch) | |
tree | 0973c8e73ea72b2488e99cc226c41a6deae8b41a | |
parent | 4619526c1f0cab2da73f2b8e233e1ad7b52007b0 (diff) | |
download | openlmi-providers-c3c0fe84506667805b54d845370c77b0ac7328c7.tar.gz openlmi-providers-c3c0fe84506667805b54d845370c77b0ac7328c7.tar.xz openlmi-providers-c3c0fe84506667805b54d845370c77b0ac7328c7.zip |
minor enhancements
fixed a typo and speeded up get_instance of
LMI_InstalledSoftwareIdentity
-rw-r--r-- | src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py | 12 | ||||
-rw-r--r-- | src/software/openlmi/software/core/InstallationService.py | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py index ab4fbea..811298c 100644 --- a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py +++ b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py @@ -107,11 +107,10 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2): "Expected object path for InstalledSoftware!") model["System"] = model.path["System"] = ComputerSystem.get_path() - with YumDB.get_instance(): - pkg_info = Identity.object_path2pkg( - model['InstalledSoftware'], kind='installed') - model['InstalledSoftware'] = Identity.pkg2model(pkg_info) - return model + pkg_info = Identity.object_path2pkg( + model['InstalledSoftware'], kind='installed') + model['InstalledSoftware'] = Identity.pkg2model(pkg_info) + return model @cmpi_logging.trace_method def enum_instances(self, env, model, keys_only): @@ -135,9 +134,6 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2): Possible Errors: CIM_ERR_FAILED (some other unspecified error occurred) """ - # Prime model.path with knowledge of the keys, so key values on - # the CIMInstanceName (model.path) will automatically be set when - # we set property values on the model. model.path.update({'InstalledSoftware': None, 'System': None}) model['System'] = ComputerSystem.get_path() diff --git a/src/software/openlmi/software/core/InstallationService.py b/src/software/openlmi/software/core/InstallationService.py index 2935849..beb4351 100644 --- a/src/software/openlmi/software/core/InstallationService.py +++ b/src/software/openlmi/software/core/InstallationService.py @@ -569,7 +569,7 @@ def check_path(env, service, prop_name): sub=service.classname, super=our_service.classname): raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND, - "Class of \"%s\" must be a sublass of %s" % ( + "Class of \"%s\" must be a subclass of %s" % ( prop_name, our_service.classname)) for key in our_service.keybindings.keys(): if not key in service: |