Exit if return value diff than 0

This commit is contained in:
2023-10-03 13:24:50 +02:00
parent 59ea60576f
commit 400d4231d0

View File

@@ -12,13 +12,17 @@ REPO_UPDATER_SCRIPT = os.getcwd() + '/update_repo.sh'
def update_repositories():
for repo_path in config.git_repositories:
os.system(f"{REPO_UPDATER_SCRIPT} {repo_path}")
ret = os.system(f"{REPO_UPDATER_SCRIPT} {repo_path}")
if ret > 0:
exit(ret)
def update_stack(stack):
project_name = stack['Name']
compose_file = DOCKER_COMPOSE_PATH.format(stack['Id'])
os.system(f"{BASH_COMPANION_SCRIPT} {project_name} {compose_file}")
ret = os.system(f"{BASH_COMPANION_SCRIPT} {project_name} {compose_file}")
if ret > 0:
exit(ret)
if __name__ == '__main__':