aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-12-08 10:12:22 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-12-08 16:22:00 +0100
commit9fdb714aea93e7c0bcf15865f433d702ea94ba5b (patch)
tree659f177f5d8539c01e74871761b01f64ae1e255b /contrib
parent7b5602ae17c62a8af63886235f9c841562373c49 (diff)
downloadcalcurse-9fdb714aea93e7c0bcf15865f433d702ea94ba5b.tar.gz
calcurse-9fdb714aea93e7c0bcf15865f433d702ea94ba5b.zip
calcurse-caldav: Avoid empty multiget
When there are no new objects to pull from the server, skip the import routine instead of sending a query that requests zero items. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 7d1c0df..97125f5 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -298,6 +298,9 @@ def pull_objects(conn, syncdb, etagdict):
elif etagdict[href] != syncdb[href][0]:
modified.add(href)
+ if not missing and not modified:
+ return 0
+
# Download and import new objects from the server.
body = ('<?xml version="1.0" encoding="utf-8" ?>'
'<C:calendar-multiget xmlns:D="DAV:" '