mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #26820 from jfindlay/ctlfix
add default param in _parse_localectl in locale mod
This commit is contained in:
commit
a1749b76b8
1 changed files with 1 additions and 2 deletions
|
@ -36,8 +36,7 @@ def _parse_localectl():
|
|||
ret = {}
|
||||
for line in __salt__['cmd.run']('localectl').splitlines():
|
||||
cols = [x.strip() for x in line.split(':', 1)]
|
||||
if len(cols) > 1:
|
||||
cur_param = cols.pop(0)
|
||||
cur_param = cols.pop(0) if len(cols) > 1 else ''
|
||||
if cur_param == 'System Locale':
|
||||
try:
|
||||
key, val = re.match('^([A-Z_]+)=(.*)$', cols[0]).groups()
|
||||
|
|
Loading…
Add table
Reference in a new issue