]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Fix infinite loop in touchdown handling
authorRaphael Michel <mail@raphaelmichel.de>
Wed, 11 Sep 2019 16:00:12 +0000 (18:00 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Wed, 11 Sep 2019 16:00:12 +0000 (18:00 +0200)
fints/client.py

index bfef2d68da7043bf51f7f6de056d92cbbaea1a00..fa91beed1a6a14ab6eeb8958ff0e61af2d244013 100644 (file)
@@ -473,13 +473,14 @@ class FinTS3Client:
                 logger.info('Fetching more results ({})...'.format(touchdown_counter))
 
             touchdown_counter += 1
-            while touchdown:
+            if touchdown:
                 seg = segment_factory(touchdown)
-                self._send_with_possible_retry(dialog, seg, _continue)
+                return self._send_with_possible_retry(dialog, seg, _continue)
+            else:
+                return responses
 
         seg = segment_factory(touchdown)
-        self._send_with_possible_retry(dialog, seg, _continue)
-        return responses
+        return self._send_with_possible_retry(dialog, seg, _continue)
 
     def _find_highest_supported_command(self, *segment_classes, **kwargs):
         """Search the BPD for the highest supported version of a segment."""