Add flag to exclude policy exempt field trials when listing expired ones
This is a new version of 47cfed2a7d ("Add flag to exclude policy exempt
field trials when listing expired ones") that was reverted because the
CI didn't use a hermetic version of Python. This version relies on older
Python constructs so it can be used by the CI.
Bug: None
Change-Id: I3b4794242d48c59ad94c6210c774cced362fc279
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346600
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42029}
This commit is contained in:
parent
d5c107d5d4
commit
06986dc187
@ -1024,7 +1024,9 @@ def cmd_header(args: argparse.Namespace) -> None:
|
||||
def cmd_expired(args: argparse.Namespace) -> None:
|
||||
today = todays_date()
|
||||
diff = datetime.timedelta(days=args.in_days)
|
||||
expired = expired_field_trials(today + diff)
|
||||
expired = expired_field_trials(
|
||||
today + diff,
|
||||
ACTIVE_FIELD_TRIALS if args.no_exempt else REGISTERED_FIELD_TRIALS)
|
||||
|
||||
if len(expired) <= 0:
|
||||
return
|
||||
@ -1069,6 +1071,12 @@ def main() -> None:
|
||||
Lists all expired field trials. Exits with a non-zero exit status if
|
||||
any field trials has expired, ignoring the --in-days argument.
|
||||
''')
|
||||
parser_expired.add_argument(
|
||||
'--no-exempt',
|
||||
default=False,
|
||||
action='store_true',
|
||||
required=False,
|
||||
help='whether to include policy exempt field trials')
|
||||
parser_expired.add_argument(
|
||||
'--in-days',
|
||||
default=0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user