From a6ce56264b9e0b4734d9e6931738b60507ef651a Mon Sep 17 00:00:00 2001 From: David Boreham Date: Wed, 28 Sep 2022 10:21:37 -0600 Subject: [PATCH] Fix branch processing when no branches specified --- app/deploy_system.py | 11 +---------- app/setup_repositories.py | 2 ++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/deploy_system.py b/app/deploy_system.py index 5b8f424b..d779bef9 100644 --- a/app/deploy_system.py +++ b/app/deploy_system.py @@ -20,16 +20,7 @@ import argparse from decouple import config from python_on_whales import DockerClient import click - -def include_exclude_check(s, include, exclude): - if include == None and exclude == None: - return True - if include != None: - include_list = include.split(",") - return s in include_list - if exclude != None: - exclude_list = exclude.split(",") - return s not in exclude_list +from .util import include_exclude_check @click.command() @click.option('--include', help="only start these components") diff --git a/app/setup_repositories.py b/app/setup_repositories.py index 8a4b1217..f595e7dd 100644 --- a/app/setup_repositories.py +++ b/app/setup_repositories.py @@ -58,6 +58,8 @@ def command(ctx, check_only, pull, branches_file): verbose = ctx.obj.verbose dry_run = ctx.obj.dry_run + branches = [] + if branches_file: if verbose: print(f"loading branches from: {branches_file}")