From bf6d6f90e5475d3b42ea4e1c341a80ef15ea844f Mon Sep 17 00:00:00 2001 From: Dave McKay Date: Thu, 25 Jul 2024 22:05:13 +0100 Subject: [PATCH] exclude --- csd3-side/scripts/lsst-backup.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/csd3-side/scripts/lsst-backup.py b/csd3-side/scripts/lsst-backup.py index 47a63b6..e2745c2 100644 --- a/csd3-side/scripts/lsst-backup.py +++ b/csd3-side/scripts/lsst-backup.py @@ -780,13 +780,14 @@ def error(self, message): exclude = [] if args.exclude: - if '*' not in ''.join(args.exclude): - # treat as list - exclude = [f'{local_dir}/{excl}' for excl in args.exclude[0].split(',')] - else: - # treat as wildcard string - exclude = [item for sublist in [glob.glob(f'{local_dir}/{excl}') for excl in args.exclude] for item in sublist] - # exclude = glob.glob(f'{local_dir}/{args.exclude}') + # if '*' not in ''.join(args.exclude): + # # treat as list + # exclude = [f'{local_dir}/{excl}' for excl in args.exclude[0].split(',')] + # else: + # # treat as wildcard string + # exclude = [item for sublist in [glob.glob(f'{local_dir}/{excl}') for excl in args.exclude] for item in sublist] + # # exclude = glob.glob(f'{local_dir}/{args.exclude}') + exclude = args.exclude print(f'Excluding {exclude}') if save_config: