Older versions of python-augeas need the path passed to aug.match to be a string.

This commit is contained in:
Gareth J. Greenaway 2018-11-29 11:50:45 -08:00
parent a5c7639ecb
commit cec7cb4dc3
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -43,6 +43,7 @@ except ImportError:
# Import salt libs
import salt.utils.args
import salt.utils.data
import salt.utils.stringutils
from salt.exceptions import SaltInvocationError
log = logging.getLogger(__name__)
@ -494,7 +495,7 @@ def ls(path, load_path=None): # pylint: disable=C0103
def _match(path):
''' Internal match function '''
try:
matches = aug.match(path)
matches = aug.match(salt.utils.stringutils.to_str(path))
except RuntimeError:
return {}