X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/9dd632c04ce69cbaedc72ded68dc6323605b4447..f97d6c209f065d708b497e377607e2a0e91e8f79:/tasklib/lazy.py diff --git a/tasklib/lazy.py b/tasklib/lazy.py index 527a995..a1b63ef 100644 --- a/tasklib/lazy.py +++ b/tasklib/lazy.py @@ -32,7 +32,7 @@ class LazyUUIDTask(object): return getattr(self, name) def __eq__(self, other): - if other['uuid']: + if other and other['uuid']: # For saved Tasks, just define equality by equality of uuids return self['uuid'] == other['uuid'] @@ -42,6 +42,12 @@ class LazyUUIDTask(object): def __repr__(self): return "LazyUUIDTask: {0}".format(self._uuid) + def __copy__(self): + return LazyUUIDTask(self._tw, self._uuid) + + def __deepcopy__(self, memo): + return LazyUUIDTask(self._tw, self._uuid) + @property def saved(self): """