Skip to content

Commit

Permalink
utils/path.py: fix a DeprecationWarning
Browse files Browse the repository at this point in the history
Fix DeprecationWarning about using or importing ABCs from collections,
instead of from 'collections.abc'
  • Loading branch information
aplanas committed Mar 25, 2019
1 parent b0a9e88 commit b19ccb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions salt/utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -301,7 +304,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)
Expand Down

0 comments on commit b19ccb7

Please sign in to comment.