mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Always return dictionary for _localectl_status
If no locale information is set, then this could be returning a string (which we don't use anyway) and will cause an error when trying to run a .get() against it. Fixes #46862
This commit is contained in:
parent
a0e168ccee
commit
2d7c7b5e33
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ def _localectl_status():
|
|||
ret[ctl_key] = {}
|
||||
ret[ctl_key][loc_set[0]] = loc_set[1]
|
||||
else:
|
||||
ret[ctl_key] = ctl_data
|
||||
ret[ctl_key] = {'data': ctl_data}
|
||||
if not ret:
|
||||
log.debug("Unable to find any locale information inside the following data:\n%s", locale_ctl_out)
|
||||
raise CommandExecutionError('Unable to parse result of "localectl"')
|
||||
|
|
Loading…
Add table
Reference in a new issue