This commit is contained in:
Christian Rendina 2020-05-05 21:41:53 +02:00
parent 824a8dfa81
commit 0f4d62f3c0
1 changed files with 7 additions and 7 deletions

View File

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