mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
cli: add support for deprecated tower-cli aliases in py2
This commit is contained in:
@@ -137,9 +137,10 @@ def parse_resource(client, skip_deprecated=False):
|
||||
|
||||
# argparse aliases are *only* supported in Python3 (not 2.7)
|
||||
kwargs = {}
|
||||
if not skip_deprecated and PY3:
|
||||
if not skip_deprecated:
|
||||
if k in DEPRECATED_RESOURCES:
|
||||
kwargs['aliases'] = [DEPRECATED_RESOURCES[k]]
|
||||
|
||||
client.subparsers[k] = subparsers.add_parser(
|
||||
k, help='', **kwargs
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user