Always coerce to unicode strings

Fix for #268
This commit is contained in:
Markus Unterwaditzer 2015-09-16 22:52:52 +02:00
parent 5506d6633d
commit 21fb9f43ae

View file

@ -11,7 +11,7 @@ from .base import Item, Storage
from .http import HTTP_STORAGE_PARAMETERS, USERAGENT, prepare_auth, \
prepare_client_cert, prepare_verify
from .. import exceptions, log, utils
from ..utils.compat import text_type, to_native
from ..utils.compat import text_type, to_native, to_unicode
dav_logger = log.get(__name__)
@ -599,7 +599,7 @@ class DavStorage(Storage):
for prop in root.findall('.//' + lxml_selector):
text = getattr(prop, 'text', None)
if text:
return text
return to_unicode(text)
def set_meta(self, key, value):
try: