]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Use a clean dialog for fetching TAN media
authorRaphael Michel <mail@raphaelmichel.de>
Thu, 9 Jan 2020 09:47:10 +0000 (10:47 +0100)
committerRaphael Michel <mail@raphaelmichel.de>
Thu, 9 Jan 2020 09:47:10 +0000 (10:47 +0100)
fints/client.py
fints/utils.py

index 1d7554f28ffec350ff465316670a39520e9978f8..def8874066f2e3d2d1d40b3d1869e445afb892fa 100644 (file)
@@ -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
 
index 0b0cd08af5926b2e7dac4d50a260ce2ea079fa78..66ee1e4309558f2c9f4700cb5fbe800eaad3a5c8 100644 (file)
@@ -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: