diff --git a/lib/galaxy/web/framework/base.py b/lib/galaxy/web/framework/base.py index ce3e2dbffa8..cb310760418 100644 --- a/lib/galaxy/web/framework/base.py +++ b/lib/galaxy/web/framework/base.py @@ -462,8 +462,9 @@ def flatten( seq ): """ Flatten a possible nested set of iterables """ - if isinstance( seq, ( types.GeneratorType, list, tuple ) ): - for y in flatten( seq ): - yield smart_str(y) - else: - yield smart_str(seq) + for x in seq: + if isinstance( x, ( types.GeneratorType, list, tuple ) ): + for y in flatten( x ): + yield smart_str( y ) + else: + yield smart_str( x )