From 601bfa39dcbf89344704178e04854fe5cff34d7c Mon Sep 17 00:00:00 2001 From: Dave McKay Date: Fri, 26 Jul 2024 09:58:36 +0100 Subject: [PATCH] update help string --- csd3-side/scripts/lsst-backup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/csd3-side/scripts/lsst-backup.py b/csd3-side/scripts/lsst-backup.py index e2745c2..19fa930 100644 --- a/csd3-side/scripts/lsst-backup.py +++ b/csd3-side/scripts/lsst-backup.py @@ -719,7 +719,7 @@ def error(self, message): parser.add_argument('--local-path', type=str, help='Absolute path to the folder to be uploaded.') parser.add_argument('--S3-prefix', type=str, help='Prefix to be used in S3 object keys.') parser.add_argument('--S3-folder', type=str, help='Subfolder(s) at the end of the local path to be used in S3 object keys.', nargs='?', const='', default='') - parser.add_argument('--exclude', nargs='+', help='Folders to exclude from upload as a list or wildcard. Must be relative paths from the local path.') + parser.add_argument('--exclude', nargs='+', help="Folders to exclude from upload as a list in the form ['dir1', 'dir2', ...] or other valid YAML. Must be subdorectories of the specified local path, given as relative paths.") parser.add_argument('--nprocs', type=int, help='Number of CPU cores to use for parallel upload.') parser.add_argument('--no-collate', default=False, action='store_true', help='Turn off collation of subfolders containing small numbers of small files into zip files.') parser.add_argument('--dryrun', default=False, action='store_true', help='Perform a dry run without uploading files.') @@ -780,13 +780,6 @@ 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}') exclude = args.exclude print(f'Excluding {exclude}')