]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Shortcut in fetch_tan_mechanisms if data is already known
authorRaphael Michel <mail@raphaelmichel.de>
Sun, 22 Dec 2019 16:21:48 +0000 (17:21 +0100)
committerRaphael Michel <mail@raphaelmichel.de>
Sun, 22 Dec 2019 16:21:48 +0000 (17:21 +0100)
fints/client.py

index 182b6ddc74021e5322f9731870abd04e0abfb181..fee94dde9c8f6661cb6eb32692091a351a79a0b0 100644 (file)
@@ -1121,6 +1121,9 @@ class FinTS3PinTanClient(FinTS3Client):
     def fetch_tan_mechanisms(self):
         self.set_tan_mechanism('999')
         self._ensure_system_id()
+        if self.get_current_tan_mechanism():
+            # We already got a reply through _ensure_system_id
+            return self.get_current_tan_mechanism()
         with self._new_dialog():
             return self.get_current_tan_mechanism()