mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
fix strings with spaces not being handled properly
This commit is contained in:
parent
47f3ee48b4
commit
f8166ccb52
@ -142,6 +142,8 @@ def _write_config(config):
|
||||
with salt.utils.atomicfile.atomic_open('/usbkey/config', 'w') as config_file:
|
||||
config_file.write("#\n# This file was generated by salt\n#\n")
|
||||
for prop in OrderedDict(sorted(config.items())):
|
||||
if ' ' in config[prop] and not config[prop].startswith('"'):
|
||||
config[prop] = '"{0}"'.format(config[prop])
|
||||
config_file.write("{0}={1}\n".format(prop, config[prop]))
|
||||
log.debug('smartos.config - wrote /usbkey/config: {0}'.format(config))
|
||||
except IOError:
|
||||
|
Loading…
Reference in New Issue
Block a user