From: Tomas Babej Date: Thu, 24 Dec 2015 16:56:55 +0000 (+0100) Subject: lazy: Properly override getattr calls X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/da913b9a9b302513f312b1fe6dd0246805eb29a5?ds=sidebyside lazy: Properly override getattr calls --- diff --git a/tasklib/lazy.py b/tasklib/lazy.py index 543abf0..04ccdf5 100644 --- a/tasklib/lazy.py +++ b/tasklib/lazy.py @@ -29,7 +29,7 @@ class LazyUUIDTask(object): # Getattr is called only if the attribute could not be found using # normal means self.replace() - return self.name + return getattr(self, name) def __eq__(self, other): if other['uuid']: @@ -83,7 +83,7 @@ class LazyUUIDTaskSet(object): raise AttributeError else: self.replace() - return self.name + return getattr(self, name) def __repr__(self): return "LazyUUIDTaskSet([{0}])".format(', '.join(self._uuids))