Common: check_expired_locked_rules use SQLalchemy#160
Common: check_expired_locked_rules use SQLalchemy#160voetberg wants to merge 3 commits intorucio:masterfrom
Conversation
da54b1f to
92ff4c5
Compare
dchristidis
left a comment
There was a problem hiding this comment.
Please split your PR into multiple commits. You can take #138 as an example.
It may seem tedious for such a small and simple probe, but it’s a good habit, one that should be adopted early.
92ff4c5 to
8899df8
Compare
dchristidis
left a comment
There was a problem hiding this comment.
You’re also porting the probe from Python 2 to Python 3, but that is not described in your commits. The changes to the shebang and the print statements should be split in a separate commit.
In case you’re not convinced by the usefulness of this, there was a print 'Locked expired rules' statement that you silently removed. It required effort from me to notice it; it would have been obvious if the changes had been split as recommended.
| status = CRITICAL | ||
| print row[0], row[1], row[2] | ||
| print(row[0], row[1], row[2]) | ||
|
|
There was a problem hiding this comment.
This blank line (and the similar one you introduced later) produces a curious grouping. According to PEP 8:
Use blank lines in functions, sparingly, to indicate logical sections.
A try and its associated except statements are typically part of the same section. It would make more sense to introduce a blank line before the second try statement and before the last sys.exit(status) call.
8899df8 to
ec4b89b
Compare
Address part of #127 - Update without Prometheus