From 91bb0120e31df0920a9da20752a5d0648d53ec86 Mon Sep 17 00:00:00 2001 From: mhassan1 Date: Mon, 2 Dec 2024 11:46:58 -0500 Subject: [PATCH] cli: set non-zero return code for `canceled` status --- awxkit/awxkit/cli/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awxkit/awxkit/cli/custom.py b/awxkit/awxkit/cli/custom.py index 0bbaea3b59d2..835bd743c1fb 100644 --- a/awxkit/awxkit/cli/custom.py +++ b/awxkit/awxkit/cli/custom.py @@ -79,7 +79,7 @@ def monitor(self, response, **kwargs): status = mon(response, self.page.connection.session, **monitor_kwargs) if status: response.json['status'] = status - if status in ('failed', 'error'): + if status in ('failed', 'error', 'canceled'): setattr(response, 'rc', 1) return response @@ -559,7 +559,7 @@ def perform(self, **kwargs): ) if status: response.json['status'] = status - if status in ('failed', 'error'): + if status in ('failed', 'error', 'canceled'): setattr(response, 'rc', 1) else: return 'Unable to monitor finished job'