From 6783d5faa0b09aa29252495b2c94952b12f159e6 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 11 Mar 2018 10:24:27 +0100 Subject: [PATCH] Remove a boolean check to make numpy arrays work better with .msg() --- evennia/accounts/accounts.py | 2 +- evennia/objects/objects.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index b90b5ac8a..48d03d8dc 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -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) diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index d4ce39097..f58357070 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -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)