mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
b593328176
commit
d8248dd368
1 changed files with 2 additions and 2 deletions
|
@ -163,7 +163,7 @@ def present(
|
|||
fullkey = sshre.search(name)
|
||||
# if it is {key} [comment]
|
||||
if not fullkey:
|
||||
key_and_comment = name.split()
|
||||
key_and_comment = name.split(None, 1)
|
||||
name = key_and_comment[0]
|
||||
if len(key_and_comment) == 2:
|
||||
comment = key_and_comment[1]
|
||||
|
@ -172,7 +172,7 @@ def present(
|
|||
if fullkey.group(1):
|
||||
options = fullkey.group(1).split(',')
|
||||
# key is of format: {enc} {key} [comment]
|
||||
comps = fullkey.group(2).split()
|
||||
comps = fullkey.group(2).split(None, 2)
|
||||
enc = comps[0]
|
||||
name = comps[1]
|
||||
if len(comps) == 3:
|
||||
|
|
Loading…
Add table
Reference in a new issue