mirror of https://gitlab.com/bashrc2/epicyon
Handle posts without text
parent
0c36d99e28
commit
946c10e3aa
2
utils.py
2
utils.py
|
@ -852,6 +852,8 @@ def _genderFromString(translate: {}, text: str) -> str:
|
||||||
"""Given some text, does it contain a gender description?
|
"""Given some text, does it contain a gender description?
|
||||||
"""
|
"""
|
||||||
gender = None
|
gender = None
|
||||||
|
if not text:
|
||||||
|
return None
|
||||||
textOrig = text
|
textOrig = text
|
||||||
text = text.lower()
|
text = text.lower()
|
||||||
if translate['He/Him'].lower() in text or \
|
if translate['He/Him'].lower() in text or \
|
||||||
|
|
Loading…
Reference in New Issue