Fix keyerror with synchronize

Apparently we may need to initialize the option if it isn't present.

Change-Id: I4a9f4f2ace3aeb914feba868e2ac8a86223232be
This commit is contained in:
James E. Blair 2017-02-24 13:40:57 -05:00
parent b2fc375704
commit 877897dc1a
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ class ActionModule(synchronize.ActionModule):
dest = self._task.args.get('dest', None)
pull = self._task.args.get('pull', False)
if 'rsync_opts' not in self._task.args:
self._task.args['rsync_opts'] = []
if '--safe-links' not in self._task.args['rsync_opts']:
self._task.args['rsync_opts'].append('--safe-links')