Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
commit 0aff7462c237565c62675384baed5553edb30fe9 Author: Peter Hatina phatina@redhat.com Date: Thu Feb 14 10:30:11 2013 +0100
fix _LmiInstanceMethod::__call__() update error message
cli-tools/lmi/lmi_client_shell.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/cli-tools/lmi/lmi_client_shell.py b/cli-tools/lmi/lmi_client_shell.py index 2c641b7..b1b2fc9 100644 --- a/cli-tools/lmi/lmi_client_shell.py +++ b/cli-tools/lmi/lmi_client_shell.py @@ -561,13 +561,14 @@ class _LmiInstanceMethod(BaseObject): if LmiBaseClient._get_use_exceptions(): raise LmiMethodCallError("Could not perform CIM -> LMI object transformation") return LmiReturnValue(rval = rval, rparams = {}, errorstr = errorstr) - (new_inst, _, inst_errorstr) = self._client._get_instance( + (new_inst, _, _) = self._client._get_instance( self._lmi_instance.path, LocalOnly = False) if not new_inst: # NOTE: this is wrong! What should we do? + errorstr = "Could not update an LMI object after a method call" if LmiBaseClient._get_use_exceptions(): - raise LmiMethodCallError("Could not update an LMI object after a method call") - return LmiReturnValue(rval = rval, rparams = {}, errorstr = inst_errorstr) + raise LmiMethodCallError(errorstr) + return LmiReturnValue(rval = rval, rparams = {}, errorstr = errorstr) self._lmi_instance._cim_instance = new_inst return LmiReturnValue( hostname = self._client.hostname,
cura-tools-devel@lists.fedorahosted.org