cli: fix TypeError in HelpfulArgumentParser for python 3.12.8 and 3.13.1 (#15692)

cli: fix `TypeError` in `HelpfulArgumentParser` for python 3.12.8 and 3.13.1 (related #15687)

Signed-off-by: mhassan1 <marc.j.hassan@gmail.com>
This commit is contained in:
Marc Hassan 2025-05-20 10:45:06 -04:00 committed by GitHub
parent 7995196cff
commit 3eb809696a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,14 +40,6 @@ class HelpfulArgumentParser(ArgumentParser):
self._print_message('\n')
self.exit(2, '%s: %s\n' % (self.prog, message))
def _parse_known_args(self, args, ns):
for arg in ('-h', '--help'):
# the -h argument is extraneous; if you leave it off,
# awx-cli will just print usage info
if arg in args:
args.remove(arg)
return super(HelpfulArgumentParser, self)._parse_known_args(args, ns)
def color_enabled():
return _color.enabled