mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47025 from terminalmage/fix-server_id-windows
Fix server_id grain in PY3 on Windows
This commit is contained in:
commit
9e37cfc9d6
1 changed files with 1 additions and 2 deletions
|
@ -2411,9 +2411,8 @@ def get_server_id():
|
|||
if py_ver >= (3, 3):
|
||||
# Python 3.3 enabled hash randomization, so we need to shell out to get
|
||||
# a reliable hash.
|
||||
py_bin = 'python{0}.{1}'.format(*py_ver)
|
||||
id_hash = __salt__['cmd.run'](
|
||||
[py_bin, '-c', 'print(hash("{0}"))'.format(id_)],
|
||||
[sys.executable, '-c', 'print(hash("{0}"))'.format(id_)],
|
||||
env={'PYTHONHASHSEED': '0'}
|
||||
)
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue