summaryrefslogtreecommitdiff
path: root/contrib/caldav/calcurse-caldav.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/caldav/calcurse-caldav.py')
-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: