Commit fbce402c authored by Petr Tuma's avatar Petr Tuma Committed by Lubomir Bulej

Minor changes to the disl.py script to use Python 3.

parent a7bc3130
#!/usr/bin/env python
#!/usr/bin/env python3
import argparse
import itertools
......@@ -306,12 +306,12 @@ def flatten_all(object):
if object is None:
return None
if isinstance(object, basestring):
if isinstance(object, str):
return [object]
result = []
for x in object:
if hasattr(x, "__iter__") and not isinstance(x, basestring):
if hasattr(x, "__iter__") and not isinstance(x, str):
result.extend(flatten_all(x))
else:
result.append(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment