Don't compare group_vars paths with bytestrings (#27922)

* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
This commit is contained in:
Brandon Schlueter 2017-08-11 10:21:20 -04:00 committed by Brian Coca
parent 0464a21a85
commit 0e334ca821

View file

@ -122,7 +122,7 @@ class VarsModule(BaseVarsPlugin):
found = []
for spath in os.listdir(path):
if not spath.startswith(b'.') and not spath.endswith(b'~'): # skip hidden and backups
if not spath.startswith(u'.') and not spath.endswith(u'~'): # skip hidden and backups
ext = os.path.splitext(spath)[-1]
full_spath = os.path.join(path, spath)