mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Lint
This commit is contained in:
parent
42b43820ad
commit
3900d9069d
@ -29,7 +29,7 @@ import salt.ext.six as six
|
||||
from salt.utils import vt
|
||||
from salt.exceptions import CommandExecutionError, TimedProcTimeoutError
|
||||
from salt.log import LOG_LEVELS
|
||||
from salt.ext.six.moves import range
|
||||
from salt.ext.six.moves import range, zip
|
||||
from salt.ext.six.moves import shlex_quote as _cmd_quote
|
||||
|
||||
# Only available on POSIX systems, nonfatal on windows
|
||||
@ -394,9 +394,9 @@ def _run(cmd,
|
||||
import itertools
|
||||
env_runas = dict(itertools.izip(*[iter(env_encoded.split(b'\0'))]*2))
|
||||
elif six.PY3:
|
||||
if isinstance(env_encoded, str):
|
||||
env_encoded = env_encoded.encode(__salt_system_encoding__)
|
||||
env_runas = dict(zip(*[iter(env_encoded.split(b'\0'))]*2))
|
||||
if isinstance(env_encoded, str):
|
||||
env_encoded = env_encoded.encode(__salt_system_encoding__)
|
||||
env_runas = dict(list(zip(*[iter(env_encoded.split(b'\0'))]*2)))
|
||||
env_runas.update(env)
|
||||
env = env_runas
|
||||
# Encode unicode kwargs to filesystem encoding to avoid a
|
||||
|
Loading…
Reference in New Issue
Block a user