mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
6d52aeb739
On PY2, when os.walk is invoked with a str as input, the paths in the return data are all str types as well. This leaves undecoded unicode data in those strings when files/dirs under the top dir that was passed contain unicode characters in the filename. >>> import os >>> list(os.walk('temp')) [('temp', [], ['\xd0\x94.txt', 'foo.txt'])] >>> list(os.walk(u'temp')) [(u'temp', [], [u'\u0414.txt', u'foo.txt'])] The helper introduced here ensures that we always invoke os.walk with a unicode top-level dir, so that we get unicode types in the return data. |
||
---|---|---|
.. | ||
integration | ||
kitchen | ||
perf | ||
pkg/rpm | ||
support | ||
unit | ||
utils | ||
__init__.py | ||
buildpackage.py | ||
committer_parser.py | ||
conftest.py | ||
consist.py | ||
eventlisten.py | ||
eventlisten.sh | ||
jenkins.py | ||
minionswarm.py | ||
modparser.py | ||
packdump.py | ||
runtests.py | ||
salt-tcpdump.py | ||
saltsh.py | ||
wheeltest.py | ||
whitelist.txt | ||
zypp_plugin.py |