python-caldav / caldav

Apache License 2.0
314 stars 94 forks source link

fix log message : argument was bytes not String #299

Closed aaujon closed 1 year ago

aaujon commented 1 year ago

Fix logger, error message was :

  File "/home/arnaud/.local/lib/python3.10/site-packages/caldav/davclient.py", line 77, in __init__
    "Expected some valid XML from the server, but got this: \n"
TypeError: can only concatenate str (not "bytes") to str
tobixen commented 1 year ago

While you're at it, a bit further up there is this one:

if content_length == 0 or not self._raw:

Perhaps this would be better:

if content_length == 0 or not self._raw.strip():
tobixen commented 1 year ago

Nevermind, I think I misunderstood it.

aaujon commented 1 year ago

Thanks for the quick merge :)