mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47403 from rallytime/bp-47356
Back-port #47356 to 2018.3
This commit is contained in:
commit
4e6870305c
1 changed files with 2 additions and 5 deletions
|
@ -129,13 +129,10 @@ def assign(name, value):
|
|||
tran_tab = name.translate(''.maketrans('./', '/.'))
|
||||
else:
|
||||
if isinstance(name, unicode): # pylint: disable=incompatible-py3-code
|
||||
trans_args = ({
|
||||
ord('/'): '.',
|
||||
ord('.'): '/'
|
||||
},)
|
||||
trans_args = {ord('/'): u'.', ord('.'): u'/'}
|
||||
else:
|
||||
trans_args = string.maketrans('./', '/.')
|
||||
tran_tab = name.translate(*trans_args)
|
||||
tran_tab = name.translate(trans_args)
|
||||
|
||||
sysctl_file = '/proc/sys/{0}'.format(tran_tab)
|
||||
if not os.path.exists(sysctl_file):
|
||||
|
|
Loading…
Add table
Reference in a new issue