From d589fdc86a615409f4fd85e2d73bbd48398753de Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Thu, 10 Mar 2022 20:33:05 +0000 Subject: [PATCH] SERVER-64421 Ban extra args to errorcodes.py --- buildscripts/errorcodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildscripts/errorcodes.py b/buildscripts/errorcodes.py index aeef3aa1792..2f18298db9f 100755 --- a/buildscripts/errorcodes.py +++ b/buildscripts/errorcodes.py @@ -308,7 +308,9 @@ def main(): "--ticket", dest="ticket", type="str", action="store", default=0, help="Generate error codes for a given SERVER ticket number. Inputs can be of" " the form: `--ticket=12345` or `--ticket=SERVER-12345`.") - (options, _) = parser.parse_args() + options, extra = parser.parse_args() + if extra: + parser.error(f"Unrecognized arguments: {' '.join(extra)}") global list_files # pylint: disable=global-statement,invalid-name list_files = options.list_files