From: Fredrik Tolf Date: Fri, 13 Nov 2020 20:41:22 +0000 (+0100) Subject: fsb: Fixed bankid status bug. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=8cda37c591cee501f0a79efe9728950c9929637f;p=fulbank.git fsb: Fixed bankid status bug. --- diff --git a/fulbank/fsb.py b/fulbank/fsb.py index 834536a..c7af807 100644 --- a/fulbank/fsb.py +++ b/fulbank/fsb.py @@ -243,14 +243,10 @@ class session(object): if resolve(fld, ("field",), None) == "userId": raise autherror(fld["message"]) raise - if data.get("status") != "USER_SIGN": - raise fmterror("unexpected bankid status: " + str(data.get("status"))) + st = data.get("status") vfy = linkurl(resolve(data, ("links", "next", "uri"))) fst = None while True: - time.sleep(3) - vdat = self._jreq(vfy) - st = vdat.get("status") if st in {"USER_SIGN", "CLIENT_NOT_STARTED"}: if st != fst: conv.message("Status: %s" % (st,), auth.conv.msg_info) @@ -263,6 +259,9 @@ class session(object): raise autherror("authentication cancelled") else: raise fmterror("unexpected bankid status: " + str(st)) + time.sleep(3) + vdat = self._jreq(vfy) + st = vdat.get("status") def keepalive(self): data = self._jreq("v5/framework/clientsession")