From 16d404a9ed05f29c74832909ce937c3ba372e7a7 Mon Sep 17 00:00:00 2001 From: Hoffelhas Date: Thu, 31 Dec 2020 16:02:58 +0100 Subject: [PATCH] Fixed bug which caused a wrong read of the start=DATE string --- autodoist.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autodoist.py b/autodoist.py index f5b8d88..72a3348 100644 --- a/autodoist.py +++ b/autodoist.py @@ -696,11 +696,11 @@ def main(): f1 = item['content'].find('start=') f2 = item['content'].find('start=due-') if f1 > -1 and f2 == -1: - f_end = item['content'][f+6:].find(' ') + f_end = item['content'][f1+6:].find(' ') if f_end > -1: - start_date = item['content'][f+6:f+6+f_end] + start_date = item['content'][f1+6:f1+6+f_end] else: - start_date = item['content'][f+6:] + start_date = item['content'][f1+6:] # If start-date hasen't passed, remove all labels start_date = datetime.strptime(start_date , args.dateformat)