From b3e97b5c3d8f094bc4853b51423460b33d89da98 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 b90b5ac8ab..48d03d8dc8 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 d4ce390977..f583570707 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)