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>
This commit is contained in:
@@ -298,6 +298,9 @@ def pull_objects(conn, syncdb, etagdict):
|
|||||||
elif etagdict[href] != syncdb[href][0]:
|
elif etagdict[href] != syncdb[href][0]:
|
||||||
modified.add(href)
|
modified.add(href)
|
||||||
|
|
||||||
|
if not missing and not modified:
|
||||||
|
return 0
|
||||||
|
|
||||||
# Download and import new objects from the server.
|
# Download and import new objects from the server.
|
||||||
body = ('<?xml version="1.0" encoding="utf-8" ?>'
|
body = ('<?xml version="1.0" encoding="utf-8" ?>'
|
||||||
'<C:calendar-multiget xmlns:D="DAV:" '
|
'<C:calendar-multiget xmlns:D="DAV:" '
|
||||||
|
|||||||
Reference in New Issue
Block a user