From 475c3416862703748525c816a2b0df82386cca0c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 25 Jan 2016 13:08:17 +0100 Subject: calcurse-caldav: Fix late retrieval of ETag Fixes another regression introduced in badbd71 (calcurse-caldav: Add a debug mode, 2016-01-23). Signed-off-by: Lukas Fleischer --- contrib/caldav/calcurse-caldav.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/caldav') diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 79f8e33..909d27b 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -192,10 +192,10 @@ def push_object(conn, objhash): body = calcurse_export(objhash) headers, body = remote_query("PUT", path + objhash + ".ics", {}, body) - if not 'ETag' in headers: + if not headers: return None - etag = headers['ETag'] + etag = [header[1] for header in headers if header[0] == 'ETag'][0] while not etag: hrefmap = get_hrefmap(conn, objhash) if len(hrefmap.keys()) > 0: -- cgit v1.2.3-70-g09d2