1
0
Fork 0

printing message if patch successful

This commit is contained in:
Christian Kühnel 2019-11-18 17:07:31 +01:00
parent e2725013d4
commit 8f72543819

View file

@ -60,12 +60,13 @@ def _apply_patch(diff_id: str, conduit_token: str, host: str):
'--conduit-token "{}" --conduit-uri "{}"'.format(
diff_id, conduit_token, host )
result = subprocess.run(cmd, capture_output=True, shell=True, text=True)
print(result.stdout + result.stderr)
if result.returncode != 0:
print('ERROR: arc patch failed with error code {} and message:'.format(result.returncode))
print(result.stdout + result.stderr)
print('ERROR: arc patch failed with error code {}.'.format(result.returncode))
raise subprocess.CalledProcessError('ERROR: arc patch failed')
print('Patching completed.')
if __name__ == "__main__":
main()