From 480009a829f245d80e638a243782655ac11b0624 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Fri, 26 Jan 2018 08:43:12 -0600 Subject: [PATCH] Pass unicode path to reg.set_value --- salt/modules/win_path.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/modules/win_path.py b/salt/modules/win_path.py index da472a195d..613ec3d78d 100644 --- a/salt/modules/win_path.py +++ b/salt/modules/win_path.py @@ -14,6 +14,7 @@ import os import re # Import Salt libs +import salt.utils.data import salt.utils.platform import salt.utils.stringutils @@ -157,7 +158,7 @@ def add(path, index=0): 'HKEY_LOCAL_MACHINE', 'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment', 'PATH', - str(';').join(sysPath), # future lint: disable=blacklisted-function + ';'.join(salt.utils.data.decode(sysPath)), 'REG_EXPAND_SZ' ) @@ -205,7 +206,7 @@ def remove(path): 'HKEY_LOCAL_MACHINE', 'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment', 'PATH', - str(';').join(sysPath), # future lint: disable=blacklisted-function + ';'.join(salt.utils.data.decode(sysPath)), 'REG_EXPAND_SZ' ) if regedit: