Merge pull request #47165 from terminalmage/issue47081

Make sure a str type is passed to os.walk
This commit is contained in:
Nicole Thomas 2018-04-19 10:59:15 -04:00 committed by GitHub
commit 2ee8006da3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,5 +406,5 @@ def os_walk(top, *args, **kwargs):
This is a helper than ensures that all paths returned from os.walk are
unicode.
'''
for item in os.walk(top, *args, **kwargs):
for item in os.walk(salt.utils.stringutils.to_str(top), *args, **kwargs):
yield salt.utils.data.decode(item, preserve_tuples=True)