[Calypso-commits] [calypso] 01/01: Catch and ValidateError, but still return the objects contents.
Jelmer Vernooij
jelmer at moszumanska.debian.org
Mon May 16 19:58:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
jelmer pushed a commit to branch master
in repository calypso.
commit 27ab6870069b55f2d78af564b378e7a7dce76adb
Author: Jelmer Vernooij <jelmer at jelmer.uk>
Date: Mon May 16 16:22:06 2016 +0000
Catch and ValidateError, but still return the objects contents.
---
calypso/webdav.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/calypso/webdav.py b/calypso/webdav.py
index d74ecd5..ef102fc 100644
--- a/calypso/webdav.py
+++ b/calypso/webdav.py
@@ -35,6 +35,7 @@ import tempfile
import vobject
import re
import subprocess
+import vobject.base
import ConfigParser
@@ -171,7 +172,11 @@ class Item(object):
Text is the serialized form of the item.
"""
- return self.object.serialize().decode('utf-8')
+ try:
+ return self.object.serialize().decode('utf-8')
+ except vobject.base.ValidateError, e:
+ self.log.warn('Validation error %s in %s', e, self.urlpath)
+ return self.object.serialize(validate=False).decode('utf-8')
@property
def length(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/calypso/calypso.git
More information about the Calypso-commits
mailing list