aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-01-25 13:08:17 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-01-25 13:08:17 +0100
commit475c3416862703748525c816a2b0df82386cca0c (patch)
treee653f64e1cf8133c6af321f3e37ab1b378a13b1c /contrib
parent5abef70ee5cdde15b07e70be603985cdc813aeb1 (diff)
downloadcalcurse-475c3416862703748525c816a2b0df82386cca0c.tar.gz
calcurse-475c3416862703748525c816a2b0df82386cca0c.zip
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 <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py4
1 files changed, 2 insertions, 2 deletions
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: