From 1778aeab50843fa9c0788253bac5a0cdde9741da Mon Sep 17 00:00:00 2001 From: Arves100 Date: Tue, 5 May 2020 17:21:36 +0200 Subject: [PATCH] missing selfs --- inline.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inline.py b/inline.py index 0220352..8423ce2 100644 --- a/inline.py +++ b/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')