X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/b9c7e4bd98658a199a03d3aa7f832f4e65ddd360..f97d6c209f065d708b497e377607e2a0e91e8f79:/tasklib/backends.py?ds=inline diff --git a/tasklib/backends.py b/tasklib/backends.py index b15e8bd..6e7d918 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -75,7 +75,7 @@ class Backend(object): Converts TW syntax datetime string to a localized datetime object. This method is not mandatory. """ - raise NotImplemented + raise NotImplementedError class TaskWarriorException(Exception): @@ -323,8 +323,10 @@ class TaskWarrior(Backend): id_lines = [l for l in output if l.startswith('Created task ')] # Complain loudly if it seems that more tasks were created - # Should not happen - if len(id_lines) != 1 or len(id_lines[0].split(' ')) != 3: + # Should not happen. + # Expected output: Created task 1. + # Created task 1 (recurrence template). + if len(id_lines) != 1 or len(id_lines[0].split(' ')) not in (3, 5): raise TaskWarriorException("Unexpected output when creating " "task: %s" % '\n'.join(id_lines))