Use to_str/to_bytes, replacing old versions

This commit is contained in:
Griatch 2019-01-16 23:26:46 +01:00
commit c3ebd8d251
24 changed files with 130 additions and 121 deletions

View file

@ -582,7 +582,7 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
if not (isinstance(text, str) or isinstance(text, tuple)):
# sanitize text before sending across the wire
try:
text = to_str(text, force_string=True)
text = to_str(text)
except Exception:
text = repr(text)
kwargs['text'] = text