forked from HonusBot/HonusBot
sks
This commit is contained in:
parent
824a8dfa81
commit
0f4d62f3c0
14
inline.py
14
inline.py
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user