Merge ~vultaire/charm-hw-health:cron-ilorest-cron-fix into charm-hw-health:master

Proposed by Paul Goins
Status: Merged
Approved by: Paul Goins
Approved revision: a43c4ac28248f0e3a404260cec21ec7b73b07d1e
Merged at revision: 51b8e939fc2c784815a872309f7aa7a6beb63fb3
Proposed branch: ~vultaire/charm-hw-health:cron-ilorest-cron-fix
Merge into: charm-hw-health:master
Diff against target: 17 lines (+3/-3)
1 file modified
src/files/ilorest/cron_ilorest.py (+3/-3)
Reviewer Review Type Date Requested Status
Drew Freiberger (community) Approve
BootStack Reviewers Pending
Review via email: mp+389123@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Drew Freiberger (afreiberger) wrote :

Ah, sometimes check_selector was returning a list. (https://pastebin.canonical.com/p/S23k7CzV6k/) makes sense. thanks for the contribution!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/files/ilorest/cron_ilorest.py b/src/files/ilorest/cron_ilorest.py
2index 561d0aa..115c534 100755
3--- a/src/files/ilorest/cron_ilorest.py
4+++ b/src/files/ilorest/cron_ilorest.py
5@@ -121,9 +121,9 @@ class CronILOrest:
6 def main(argv=None):
7 cronilorest = CronILOrest(argv)
8
9- errors = [
10- cronilorest.check_selector(selector) for selector in cronilorest.args.selectors
11- ]
12+ errors = []
13+ for selector in cronilorest.args.selectors:
14+ errors.extend(cronilorest.check_selector(selector))
15
16 if len(errors) > 0:
17 msg = "CRIT {} error(s): {}".format(len(errors), " - ".join(errors))

Subscribers

People subscribed via source and target branches

to all changes: