From b0623c77c97889ab7b9fb30fe4bab3608e4f565d Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sun, 15 Oct 2017 14:09:57 +0200 Subject: [PATCH] Fixes #186, probably the whole logic should be refactored as the approach of hardcoding iterators which we should not iterate on is bad. Let's think about it for 0.6, maybe that just means removing the ability to return a list/tuple from a function for multiple rows, as a generator would do the same. --- bonobo/util/iterators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonobo/util/iterators.py b/bonobo/util/iterators.py index 82f8518..04c81a5 100644 --- a/bonobo/util/iterators.py +++ b/bonobo/util/iterators.py @@ -38,6 +38,6 @@ def tuplize(generator): def iter_if_not_sequence(mixed): - if isinstance(mixed, (dict, list, str)): + if isinstance(mixed, (dict, list, str, bytes, )): raise TypeError(type(mixed).__name__) return iter(mixed)