snapshot: Fix issue with setting configuration

snapper set-config expects each key-value pair to be passed as a separate
argument separated by '='.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-10-18 15:02:41 -07:00 committed by James Valleroy
parent 327741bc22
commit a5d66a1362
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -162,7 +162,7 @@ def _get_default_snapshot():
def subcommand_disable_apt_snapshot(arguments):
"""Set flag to Enable/Disable apt software snapshots in config files"""
"""Initialize Augeas."""
# Initialize Augeas
aug = augeas.Augeas(
flags=augeas.Augeas.NO_LOAD + augeas.Augeas.NO_MODL_AUTOLOAD)
aug.set('/augeas/load/Shellvars/lens', 'Shellvars.lns')
@ -215,7 +215,7 @@ def _get_delete_arg(range_list):
def subcommand_set_config(arguments):
command = ['snapper', 'set-config', arguments.config]
command = ['snapper', 'set-config'] + arguments.config.split()
subprocess.run(command, check=True)