correct way of importing for newer python versions
This commit is contained in:
parent
3aab154cdb
commit
e283acd606
|
@ -4,7 +4,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import re
|
import re
|
||||||
import collections
|
from collections.abc import Iterable
|
||||||
import math # noqa
|
import math # noqa
|
||||||
|
|
||||||
import scipy # noqa
|
import scipy # noqa
|
||||||
|
@ -18,7 +18,7 @@ scriptName = os.path.splitext(os.path.basename(__file__))[0]
|
||||||
scriptID = ' '.join([scriptName,damask.version])
|
scriptID = ' '.join([scriptName,damask.version])
|
||||||
|
|
||||||
def listify(x):
|
def listify(x):
|
||||||
return x if isinstance(x, collections.Iterable) else [x]
|
return x if isinstance(x, Iterable) else [x]
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue