Fix syntax issue with NamedTemporaryFile

We need to use filter_file.name to get the actually path.

Change-Id: I130284fdaccd1ace139d71b8a3395e9e9fa0df76
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-08-31 16:54:02 -04:00
parent efe8957ee2
commit 957cd57ea9
No known key found for this signature in database
GPG Key ID: 611A80832067AF38

View File

@ -85,11 +85,11 @@ def afs_sync(afssource, afstarget):
shell_cmd = bash_cmd.format(
src=subsource,
dst=subtarget,
filter=filter_file)
filter=filter_file.name)
output['source'] = subsource
output['destination'] = subtarget
output['output'] = subprocess.check_output(shell_cmd, shell=True)
os.remove(filter_file)
os.remove(filter_file.name)
return output_blocks