diff --git a/handler/sinks/truelayer.py b/handler/sinks/truelayer.py index 481bf89..bd4addb 100644 --- a/handler/sinks/truelayer.py +++ b/handler/sinks/truelayer.py @@ -23,9 +23,6 @@ class TrueLayer(object): self.lc = LoopingCall(self.get_new_token) self.lc.start(int(settings.TrueLayer.RefreshSec)) - def setup_auth(self): - pass - def create_auth_url(self): query = urllib.parse.urlencode( { @@ -63,7 +60,7 @@ class TrueLayer(object): self.token = parsed["access_token"] self.log.info("Retrieved access/refresh tokens - TrueLayer") - def get_new_token(self, fail=False): + def get_new_token(self): """ Exchange our refresh token for an access token. """ @@ -80,8 +77,6 @@ class TrueLayer(object): try: parsed = r.json() except JSONDecodeError: - if fail: - exit() return False if r.status_code == 200: if "access_token" in parsed.keys(): @@ -90,13 +85,9 @@ class TrueLayer(object): return True else: self.log.error(f"Token refresh didn't contain access token: {parsed}", parsed=parsed) - if fail: - exit() return False else: self.log.error(f"Cannot refresh token: {parsed}", parsed=parsed) - if fail: - exit() return False def get_accounts(self):