From 3a3284b5dfdd6d91622c39a0bebbe741c9d7bc5d Mon Sep 17 00:00:00 2001 From: Lorenzo Tanganelli Date: Fri, 3 Nov 2023 19:22:39 +0100 Subject: [PATCH] rework with check if POST exists --- awxkit/awxkit/api/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/awxkit/awxkit/api/utils.py b/awxkit/awxkit/api/utils.py index 8433579bb3..5d09a01954 100644 --- a/awxkit/awxkit/api/utils.py +++ b/awxkit/awxkit/api/utils.py @@ -15,7 +15,12 @@ def freeze(key): def parse_description(desc): options = {} - for line in desc.splitlines(): + desc_lines = [] + if 'POST' in desc: + desc_lines = desc[desc.index('POST') :].splitlines() + else: + desc_lines = desc.splitlines() + for line in desc_lines: match = descRE.match(line) if not match: continue