From: Tomas Babej Date: Sat, 26 Dec 2015 15:53:17 +0000 (+0100) Subject: LazyUUIDTask: Properly handle equality with None X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/0e325085d7cebbba5f301d472e83ce0ba58d1f15?ds=sidebyside;hp=--cc;pf=etc LazyUUIDTask: Properly handle equality with None --- 0e325085d7cebbba5f301d472e83ce0ba58d1f15 diff --git a/tasklib/lazy.py b/tasklib/lazy.py index 527a995..aa2c065 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']