Commit a2b8dbbd authored by Nicolas Wavrant's avatar Nicolas Wavrant

resilient: do not compute the signature for same file several times

parent 56895d5e
......@@ -109,6 +109,7 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign
continue
# Find if special signature function should be applied
signature_process = None
for special_slappart in special_slappart_list:
backup_identity_script_path = os.path.join(
runner_working_path,
......@@ -121,7 +122,9 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
)
break
if signature_process:
(output, error_output) = signature_process.communicate(
'\0'.join([os.path.join(dirpath, filename) for filename in filename_list])
)
......@@ -129,8 +132,8 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign
if signature_process.returncode != 0:
print(
"An issue occured when calculating the custom signature"
" with %s :\n%s" % (
backup_identity_script_path, error_output
" with %s :\n%s\n%s" % (
backup_identity_script_path, output, error_output
)
)
sys.exit(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment