From: Raphael Michel Date: Thu, 9 Jan 2020 09:47:10 +0000 (+0100) Subject: Use a clean dialog for fetching TAN media X-Git-Tag: v3.0.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9d8cbf9ae2369cadca32f394ba382f4ed80cb19;p=thirdparty%2Fpython-fints.git Use a clean dialog for fetching TAN media --- 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: