Don't check the vobject item in storage.Item
This is the responsibility of the storage plugin.
This commit is contained in:
parent
9bde9d82f4
commit
5d238afb5e
@ -380,11 +380,7 @@ class Item:
|
|||||||
def item(self):
|
def item(self):
|
||||||
if self._item is None:
|
if self._item is None:
|
||||||
try:
|
try:
|
||||||
items = tuple(vobject.readComponents(self._text))
|
self._item = vobject.readOne(self._text)
|
||||||
if len(items) != 1:
|
|
||||||
raise RuntimeError(
|
|
||||||
"Content contains %d components" % len(items))
|
|
||||||
self._item = items[0]
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise RuntimeError("Failed to parse item %r from %r: %s" %
|
raise RuntimeError("Failed to parse item %r from %r: %s" %
|
||||||
(self.href, self.collection.path, e)) from e
|
(self.href, self.collection.path, e)) from e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user