From c9d8cbf9ae2369cadca32f394ba382f4ed80cb19 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 9 Jan 2020 10:47:10 +0100 Subject: [PATCH] Use a clean dialog for fetching TAN media --- fints/client.py | 4 ++-- fints/utils.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fints/client.py b/fints/client.py index 1d7554f..def8874 100644 --- a/fints/client.py +++ b/fints/client.py @@ -1345,7 +1345,7 @@ class FinTS3PinTanClient(FinTS3Client): Returns tuple of fints.formals.TANUsageOption and a list of fints.formals.TANMedia4 or fints.formals.TANMedia5 objects.""" - with self._get_dialog() as dialog: + with self._new_dialog(lazy_init=True) as dialog: hktab = self._find_highest_supported_command(HKTAB4, HKTAB5) seg = hktab( @@ -1357,7 +1357,7 @@ class FinTS3PinTanClient(FinTS3Client): try: self._bootstrap_mode = True - response = dialog.send(seg) + response = dialog.init(seg) finally: self._bootstrap_mode = False diff --git a/fints/utils.py b/fints/utils.py index 0b0cd08..66ee1e4 100644 --- a/fints/utils.py +++ b/fints/utils.py @@ -318,8 +318,7 @@ def minimal_interactive_cli_bootstrap(client): if client.is_tan_media_required() and not client.selected_tan_medium: print("We need the name of the TAN medium, let's fetch them from the bank") - with client: - m = client.get_tan_media() + m = client.get_tan_media() if len(m[1]) == 1: client.set_tan_medium(m[1][0]) else: -- 2.47.2