summaryrefslogtreecommitdiffstats
path: root/awxkit
diff options
context:
space:
mode:
authorJeff Bradberry <jeff.bradberry@gmail.com>2022-11-08 21:13:35 +0100
committerJeff Bradberry <jeff.bradberry@gmail.com>2022-11-08 21:13:35 +0100
commit3d3e4ad150eac3b80ce96c54ae4dd9c41ef01e8e (patch)
treee5faa04ded9919d8759adda9c3492b27800b2ec6 /awxkit
parentMerge pull request #13092 from AlanCoding/tags_no_record (diff)
downloadawx-3d3e4ad150eac3b80ce96c54ae4dd9c41ef01e8e.tar.xz
awx-3d3e4ad150eac3b80ce96c54ae4dd9c41ef01e8e.zip
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.
Diffstat (limited to 'awxkit')
-rw-r--r--awxkit/awxkit/cli/resource.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/awxkit/awxkit/cli/resource.py b/awxkit/awxkit/cli/resource.py
index 27b6c623ee..eb605b146b 100644
--- a/awxkit/awxkit/cli/resource.py
+++ b/awxkit/awxkit/cli/resource.py
@@ -197,8 +197,10 @@ def parse_resource(client, skip_deprecated=False):
if hasattr(client, 'v2'):
for k in client.v2.json.keys():
- if k in ('dashboard',):
- # the Dashboard API is deprecated and not supported
+ if k in ('dashboard', 'config'):
+ # - the Dashboard API is deprecated and not supported
+ # - the Config command is already dealt with by the
+ # CustomCommand section above
continue
# argparse aliases are *only* supported in Python3 (not 2.7)