Remove a boolean check to make numpy arrays work better with .msg()

This commit is contained in:
Griatch 2018-03-11 10:24:27 +01:00
parent 1ffe0d78b8
commit b3e97b5c3d
2 changed files with 2 additions and 3 deletions

View file

@ -421,7 +421,7 @@ class DefaultAccount(with_metaclass(TypeclassBase, AccountDB)):
kwargs["options"] = options
if text and not (isinstance(text, basestring) or isinstance(text, tuple)):
if not (isinstance(text, basestring) or isinstance(text, tuple)):
# sanitize text before sending across the wire
try:
text = to_str(text, force_string=True)

View file

@ -535,8 +535,7 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
except Exception:
logger.log_trace()
if text and not (isinstance(text, basestring) or isinstance(text, tuple)):
if not (isinstance(text, basestring) or isinstance(text, tuple)):
# sanitize text before sending across the wire
try:
text = to_str(text, force_string=True)