Use a simpler code to detect not-created-yet addressbooks
This commit is contained in:
parent
61eedc2b7c
commit
2cd90c6a4a
@ -399,7 +399,7 @@ class Collection(object):
|
|||||||
try:
|
try:
|
||||||
tag = open(self.path).readlines()[0][6:].rstrip()
|
tag = open(self.path).readlines()[0][6:].rstrip()
|
||||||
except IOError:
|
except IOError:
|
||||||
if self.path.endswith(".vcf") or "carddav" in self.path:
|
if self.path.endswith((".vcf", "/carddav")):
|
||||||
props["tag"] = "VADDRESSBOOK"
|
props["tag"] = "VADDRESSBOOK"
|
||||||
else:
|
else:
|
||||||
props["tag"] = "VCALENDAR"
|
props["tag"] = "VCALENDAR"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user