diff --git a/salt/utils/path.py b/salt/utils/path.py index b1d601e464f6..132190b27167 100644 --- a/salt/utils/path.py +++ b/salt/utils/path.py @@ -6,7 +6,10 @@ # Import python libs from __future__ import absolute_import, print_function, unicode_literals -import collections +try: + from collections.abc import Iterable +except ImportError: + from collections import Iterable import errno import logging import os @@ -262,7 +265,7 @@ def which_bin(exes): ''' Scan over some possible executables and return the first one that is found ''' - if not isinstance(exes, collections.Iterable): + if not isinstance(exes, Iterable): return None for exe in exes: path = which(exe)