Fix remote cmds cleanup

When --remote-copy and --remote-exec are provided,
args.remote_cmds_cleanup_pattern is not set.

This patches fixes the evaluation of args.remote_cmds_cleanup_pattern
and prevents cdist from throwing an exception when --remote-copy
and --remote-exec are used.
This commit is contained in:
Philippe Gregoire 2017-08-14 14:25:19 -04:00
parent 7aa7a8db6d
commit 7b0b3d9415

View file

@ -270,7 +270,7 @@ class Config(object):
remote_copy = args.remote_copy_pattern.format(control_path)
else:
remote_copy = args.remote_copy
if args.remote_cmds_cleanup_pattern:
if 'remote_cmds_cleanup_pattern' in args:
remote_cmds_cleanup = args.remote_cmds_cleanup_pattern.format(
control_path)
else: