]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
fix: fix type error during get_holdings request 60/head
authorNiels Grieger <niels.grieger@gmail.com>
Wed, 27 Feb 2019 08:51:16 +0000 (09:51 +0100)
committerNiels Grieger <niels.grieger@gmail.com>
Wed, 27 Feb 2019 09:51:11 +0000 (10:51 +0100)
fints/client.py

index 55cb3ab45d1e402ada0fb14c1c41e60cce424f12..c5a7d722b4b401ff996aab9edae0a1b82201830a 100644 (file)
@@ -605,7 +605,12 @@ class FinTS3Client:
 
         holdings = []
         for resp in responses:
-            mt535_lines = str.splitlines(resp.holdings)
+            if type(resp.holdings) == bytes:
+                holding_str = resp.holdings.decode()
+            else:
+                holding_str = resp.holdings
+
+            mt535_lines = str.splitlines(holding_str)
             # The first line is empty - drop it.
             del mt535_lines[0]
             mt535 = MT535_Miniparser()