summaryrefslogtreecommitdiffstats
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.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 4d5e471..997a5f6 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -431,8 +431,15 @@ def pull_objects(hrefs_missing, hrefs_modified, conn, syncdb, etagdict):
continue
objhash = calcurse_import(cdata)
- syncdb_add(syncdb, href, etag, objhash)
- added += 1
+
+ # TODO: Add support for importing multiple events at once, see GitHub
+ # issue #20 for details.
+ if re.match(r'[0-ga-f]+$', objhash):
+ syncdb_add(syncdb, href, etag, objhash)
+ added += 1
+ else:
+ print("Failed to import object: {} ({})".format(etag, href),
+ file=sys.stderr)
return added