Skip to content

Commit

Permalink
Merge pull request #7 from lion24/fix-python-tests
Browse files Browse the repository at this point in the history
reclass: fix collections.Iterable.
  • Loading branch information
uberspot authored Mar 7, 2022
2 parents 1c847db + 261c23f commit 5246e6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reclass/values/parser_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
IGNORE_ERRORS = '+IgnoreErrors'
ALL_ENVS = '+AllEnvs'

try:
collectionsAbc = collections.abc
except:
collectionsAbc = collections


s_end = pp.StringEnd()

Expand All @@ -49,7 +54,7 @@ def _asList(x):
return x

def listify(w, modifier=_asList):
if (isinstance(w, collections.Iterable) and
if (isinstance(w, collectionsAbc.Iterable) and
not isinstance(w, six.string_types)):
cls = type(w)
if cls == pp.ParseResults:
Expand Down

0 comments on commit 5246e6a

Please sign in to comment.