mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 22:19:28 -02:30
Avoid adding the 'config' subparser twice
Once since it is defined as a CustomCommand subclass, and once because it is an endpoint at the /api/v2/ level. With Python 3.11 argparse has become more strict and will raise an exception when you try to inject duplicate subparsers.
This commit is contained in:
@@ -197,8 +197,10 @@ def parse_resource(client, skip_deprecated=False):
|
|||||||
|
|
||||||
if hasattr(client, 'v2'):
|
if hasattr(client, 'v2'):
|
||||||
for k in client.v2.json.keys():
|
for k in client.v2.json.keys():
|
||||||
if k in ('dashboard',):
|
if k in ('dashboard', 'config'):
|
||||||
# the Dashboard API is deprecated and not supported
|
# - the Dashboard API is deprecated and not supported
|
||||||
|
# - the Config command is already dealt with by the
|
||||||
|
# CustomCommand section above
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# argparse aliases are *only* supported in Python3 (not 2.7)
|
# argparse aliases are *only* supported in Python3 (not 2.7)
|
||||||
|
|||||||
Reference in New Issue
Block a user