Skip to content

Commit

Permalink
cli: set non-zero return code for canceled status
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassan1 committed Dec 2, 2024
1 parent e411f35 commit 91bb012
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions awxkit/awxkit/cli/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):

Check warning on line 82 in awxkit/awxkit/cli/custom.py

View check run for this annotation

Codecov / codecov/patch

awxkit/awxkit/cli/custom.py#L82

Added line #L82 was not covered by tests
setattr(response, 'rc', 1)
return response

Expand Down Expand Up @@ -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'):

Check warning on line 562 in awxkit/awxkit/cli/custom.py

View check run for this annotation

Codecov / codecov/patch

awxkit/awxkit/cli/custom.py#L562

Added line #L562 was not covered by tests
setattr(response, 'rc', 1)
else:
return 'Unable to monitor finished job'
Expand Down

0 comments on commit 91bb012

Please sign in to comment.