gender character message don't try to substitute text that lacks gender info

This commit is contained in:
Eldritch Semblance 2017-03-23 19:14:37 +00:00 committed by Griatch
parent 8520d5f78c
commit b2140b4ba1

View file

@ -134,5 +134,8 @@ class GenderCharacter(DefaultCharacter):
"""
# pre-process the text before continuing
text = _RE_GENDER_PRONOUN.sub(self._get_pronoun, text)
try:
text = _RE_GENDER_PRONOUN.sub(self._get_pronoun, text)
except TypeError:
pass
super(GenderCharacter, self).msg(text, from_obj=from_obj, session=session, **kwargs)