forked from HonusBot/HonusBot
missing selfs
This commit is contained in:
parent
497cfe33b0
commit
1778aeab50
18
inline.py
18
inline.py
@ -67,16 +67,16 @@ class JSONResponse(object):
|
||||
self.imgUrl = img
|
||||
self.htmlDesc = dsc
|
||||
|
||||
def isAuthorized():
|
||||
def isAuthorized(self):
|
||||
return self.auth
|
||||
|
||||
def succeeded():
|
||||
def succeeded(self):
|
||||
return self.success
|
||||
|
||||
def getHtmlDesc():
|
||||
def getHtmlDesc(self):
|
||||
return self.htmlDesc
|
||||
|
||||
def getImageUrl():
|
||||
def getImageUrl(self):
|
||||
return self.imgUrl
|
||||
|
||||
class Config:
|
||||
@ -162,11 +162,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')
|
||||
|
Loading…
Reference in New Issue
Block a user