Skip to content

Commit 8040d5f

Browse files
committed
clarify what happens when there is no periodname
1 parent 4c6c53d commit 8040d5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Framework/script/RepoCleaner/qcrepocleaner/o2-qc-repo-delete-versions-not-in-periods

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dryable
1010
def parse_args():
1111
"""Parse the arguments passed to the script."""
1212
logging.info("Parsing arguments")
13-
parser = argparse.ArgumentParser(description='Remove all the versions in the given path that don\'t match the given list of periodNames ')
13+
parser = argparse.ArgumentParser(description='Remove all the versions in the given path that don\'t match the given list of periodNames or has no periodName.')
1414
parser.add_argument('--url', dest='url', action='store', help='URL of the CCDB, with http[s]://', required=True)
1515
parser.add_argument('--log-level', dest='log_level', action='store', default="20",
1616
help='Log level (CRITICAL->50, ERROR->40, WARNING->30, INFO->20,DEBUG->10)')
@@ -56,9 +56,7 @@ def run(args):
5656
if "PeriodName" not in v.metadata:
5757
ccdb.deleteVersion(v)
5858
deleted += 1
59-
# logging.debug(f"{v} -> {v.metadata['PeriodName']}")
6059
elif v.metadata["PeriodName"] not in periods_list:
61-
# logging.info(f"Ready to delete {v}")
6260
if args.one_by_one:
6361
answer = input(" Continue? y/n\n ")
6462
if answer.lower() in ["y", "yes"]:

0 commit comments

Comments
 (0)