Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
commit 500c7586b624f0c3be667738b54520c84c9a8337 Author: Peter Hatina phatina@redhat.com Date: Thu Dec 13 11:54:38 2012 +0100
fix LmiReturnValue::__getattr__() with AttributeError
cli-tools/lmi/lmi_client_base.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cli-tools/lmi/lmi_client_base.py b/cli-tools/lmi/lmi_client_base.py index 481cd27..b215969 100644 --- a/cli-tools/lmi/lmi_client_base.py +++ b/cli-tools/lmi/lmi_client_base.py @@ -19,10 +19,10 @@ import collections _RValue = collections.namedtuple('RValue', ["rval", "rparams", "errorstr"])
class LmiReturnValue(_RValue): - def __getattr__(self, key): - if not key in self._properties: - return None - return self._properties[key] + def __getattr__(self, name): + if not name in self._properties: + raise AttributeError(name) + return self._properties[name]
def properties(self): return self._properties.keys()
cura-tools-devel@lists.fedorahosted.org