mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix indent change
This commit is contained in:
parent
0a35320aa7
commit
c1c1266cc3
1 changed files with 11 additions and 9 deletions
|
@ -41,15 +41,17 @@ def _parse_localectl():
|
|||
'/org/freedesktop/locale1')
|
||||
properties = dbus.Interface(localed, 'org.freedesktop.DBus.Properties')
|
||||
system_locale = properties.Get('org.freedesktop.locale1', 'Locale')
|
||||
try:
|
||||
key, val = re.match('^([A-Z_]+)=(.*)$', system_locale[0]).groups()
|
||||
except AttributeError:
|
||||
log.error('Odd locale parameter "{0}" detected in dbus locale '
|
||||
'output. This should not happen. You should '
|
||||
'probably investigate what caused this.'.format(
|
||||
system_locale[0]))
|
||||
else:
|
||||
ret[key] = val.replace('"', '')
|
||||
|
||||
try:
|
||||
key, val = re.match('^([A-Z_]+)=(.*)$', system_locale[0]).groups()
|
||||
except AttributeError:
|
||||
log.error('Odd locale parameter "{0}" detected in dbus locale '
|
||||
'output. This should not happen. You should '
|
||||
'probably investigate what caused this.'.format(
|
||||
system_locale[0]))
|
||||
else:
|
||||
ret[key] = val.replace('"', '')
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue