Skip to content

Commit 5def2a9

Browse files
committed
Fix TAN handshake
1 parent bdf06a2 commit 5def2a9

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

fints/client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,15 @@ def _new_dialog(self, lazy_init=False):
11581158
)
11591159

11601160
def fetch_tan_mechanisms(self):
1161-
self.set_tan_mechanism('999')
1162-
self._ensure_system_id()
1161+
if self.system_id and not self.get_current_tan_mechanism():
1162+
# system_id was persisted and given to the client, but nothing else
1163+
self.set_tan_mechanism('999')
1164+
with self._get_dialog(lazy_init=True) as dialog:
1165+
response = dialog.init()
1166+
self.process_response_message(dialog, response, internal_send=True)
1167+
else:
1168+
self.set_tan_mechanism('999')
1169+
self._ensure_system_id()
11631170
if self.get_current_tan_mechanism():
11641171
# We already got a reply through _ensure_system_id
11651172
return self.get_current_tan_mechanism()

0 commit comments

Comments
 (0)