You are exactly right. Given the complete lack of tests and the fact
that this is a dead library plus the extensive testing I've done of the
code as-is, I'm going to leave it be (unless you object strenuously).
Darn, this is bad code. This really is a stopper, so I'm going to
retract what I said before about changing the code and implement the two
suggestions you made as well as remove this line and then re-test.
Thanks for the good review. Read all the comments before replying
because there is a twist ending.
Sincerely,
M. Night Shyamalan
https:/ /codereview. appspot. com/76860047/ diff/1/ scripts/ charmsupport/ nrpe.py charmsupport/ nrpe.py (right):
File scripts/
https:/ /codereview. appspot. com/76860047/ diff/1/ scripts/ charmsupport/ nrpe.py# newcode113 charmsupport/ nrpe.py: 113: def service_ file_name( self,
scripts/
nagios_context, hostname):
On 2014/03/19 17:42:04, frankban wrote:
> nagios_context seems unused in this method.
You are exactly right. Given the complete lack of tests and the fact
that this is a dead library plus the extensive testing I've done of the
code as-is, I'm going to leave it be (unless you object strenuously).
https:/ /codereview. appspot. com/76860047/ diff/1/ scripts/ charmsupport/ nrpe.py# newcode130 charmsupport/ nrpe.py: 130: nrpe_service_file = _{}_check_ {}.cfg' .format(
scripts/
'{}/service_
On 2014/03/19 17:42:04, frankban wrote:
> The nrpe_service_file is retrieved using the external method in the
next line,
> so I think we can safely remove this one.
Good catch. Again, I am loathe to touch the known-working code, even to
do something this simple.
https:/ /codereview. appspot. com/76860047/ diff/1/ scripts/ update- nrpe.py update- nrpe.py (right):
File scripts/
https:/ /codereview. appspot. com/76860047/ diff/1/ scripts/ update- nrpe.py# newcode25 update- nrpe.py: 25: remove_nrpe_check()
scripts/
On 2014/03/19 17:42:04, frankban wrote:
> So we always remove checks and then add them (or remove them again)
based on the
> hook name. Is the second removal needed?
Darn, this is bad code. This really is a stopper, so I'm going to
retract what I said before about changing the code and implement the two
suggestions you made as well as remove this line and then re-test.
https:/ /codereview. appspot. com/76860047/