mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
only convert to bytes when using Python2
This commit is contained in:
parent
0fe32f4066
commit
cc1aa75a2f
1 changed files with 4 additions and 1 deletions
|
@ -1262,7 +1262,10 @@ def extracted(name,
|
|||
if options is None:
|
||||
try:
|
||||
with closing(tarfile.open(cached, 'r')) as tar:
|
||||
tar.extractall(salt.utils.to_bytes(name))
|
||||
if six.PY2:
|
||||
tar.extractall(salt.utils.to_bytes(name))
|
||||
else:
|
||||
tar.extractall(name)
|
||||
files = tar.getnames()
|
||||
if trim_output:
|
||||
files = files[:trim_output]
|
||||
|
|
Loading…
Add table
Reference in a new issue