mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
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:
@@ -40,14 +40,6 @@ class HelpfulArgumentParser(ArgumentParser):
|
|||||||
self._print_message('\n')
|
self._print_message('\n')
|
||||||
self.exit(2, '%s: %s\n' % (self.prog, message))
|
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():
|
def color_enabled():
|
||||||
return _color.enabled
|
return _color.enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user