From 3afc489efee793f5f23010eb20884dbe6bb5dfef Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Wed, 1 Apr 2026 11:15:16 +0000 Subject: [PATCH] fix pep --- tools/create_preprod_branch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/create_preprod_branch.py b/tools/create_preprod_branch.py index 368f6a8..c54e01f 100755 --- a/tools/create_preprod_branch.py +++ b/tools/create_preprod_branch.py @@ -88,7 +88,7 @@ def process_repositories(args, service): "repo": repo['repo'] }) continue - + if not repo_dir.exists(): try: git_repo = Repo.clone_from(repo_url, repo_dir, branch="main") @@ -112,7 +112,7 @@ def process_repositories(args, service): return branch_name = args.branch_name - + # Check if branch exists remotely remote_branch_exists = False try: @@ -129,7 +129,7 @@ def process_repositories(args, service): break except Exception as e: logging.warning(f"Error checking for remote branch: {e}") - + if remote_branch_exists: # Branch exists, checkout and merge main into it logging.debug(f"Branch {branch_name} exists, merging main into it") @@ -172,7 +172,7 @@ def process_repositories(args, service): "error": f"Error pushing branch {branch_name}: {e}", "repo": target_repo['repo'] }) - + if len(error_list) != 0: logging.error("The following errors have happened:") logging.error(error_list)