This commit is contained in:
Christian Rendina 2020-05-05 21:41:53 +02:00
parent 824a8dfa81
commit 0f4d62f3c0

View File

@ -161,11 +161,11 @@ class InlineBot:
return None
resp = None
#try:
resp = json.loads(r.text, object_hook = jsonasResponse)
#except:
# self.logger.warning('JSON deserialization failed')
# return None ## Invalid json
try:
resp = json.loads(r.text, object_hook = jsonasResponse)
except:
self.logger.warning('JSON deserialization failed')
return None ## Invalid json
if not resp.isAuthorized() or not resp.succeeded():
self.logger.warning('Unathorized/Unsuccessfull')
@ -212,10 +212,10 @@ class InlineBot:
description=self.errorText
)
qValue = self.callRequest(command, senderid, querySearch)
resp = self.callRequest(command, senderid, querySearch)
contentText = ""
if qValue == None:
if resp == None:
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",