type(None) != None

This commit is contained in:
Davte 2019-07-17 00:21:55 +02:00
parent 4b27b26467
commit f590d3d677
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.0.9" __version__ = "2.0.10"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -541,7 +541,7 @@ class Bot(TelegramBot, ObjectWithDatabase):
user_record=user_record user_record=user_record
) )
break break
if type(answer) is None: if answer is None:
answer = '' answer = ''
if type(answer) is str: if type(answer) is str:
answer = dict(text=answer) answer = dict(text=answer)