From 2cd90c6a4acf8e4dd5ace34d2ba8e2cc5b5e1ce6 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 23 Aug 2013 13:40:17 +0200 Subject: [PATCH] Use a simpler code to detect not-created-yet addressbooks --- radicale/ical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/ical.py b/radicale/ical.py index b6d123a..5c5ebdf 100644 --- a/radicale/ical.py +++ b/radicale/ical.py @@ -399,7 +399,7 @@ class Collection(object): try: tag = open(self.path).readlines()[0][6:].rstrip() except IOError: - if self.path.endswith(".vcf") or "carddav" in self.path: + if self.path.endswith((".vcf", "/carddav")): props["tag"] = "VADDRESSBOOK" else: props["tag"] = "VCALENDAR"