ruffus exceptions: for clarity only, don't iterate strings

It's a good habit to ensure any iterator test is explicit about
allowing or disallowing strings.
This commit is contained in:
James R. Barlow
2016-07-29 13:31:24 -07:00
parent 0dfceedcfb
commit d70e3d3753
+1 -1
View File
@@ -1142,7 +1142,7 @@ def traverse_ruffus_exception(e):
if isinstance(e[0], str) and len(e) == 5:
return do_ruffus_exception(e)
elif hasattr(e, '__iter__'):
elif hasattr(e, '__iter__') and not isinstance(e, str):
for exc in e:
return traverse_ruffus_exception(exc)