Merge lp:~thomir-deactivatedaccount/charms/trusty/tanuki-result-enum-api/charm-remove-nagios-checks into lp:~tanuki/charms/trusty/tanuki-result-enum-api/trunk

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 22
Merged at revision: 22
Proposed branch: lp:~thomir-deactivatedaccount/charms/trusty/tanuki-result-enum-api/charm-remove-nagios-checks
Merge into: lp:~tanuki/charms/trusty/tanuki-result-enum-api/trunk
Diff against target: 13 lines (+3/-0)
1 file modified
hooks/actions.py (+3/-0)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/charms/trusty/tanuki-result-enum-api/charm-remove-nagios-checks
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Review via email: mp+272673@code.launchpad.net

Commit message

Fix a bug where, if nagios checks are not already installed, the charm will fail.

Description of the change

Fix a bug where, if nagios checks are not already installed, the charm will fail.

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

+1

Just a FYI, there is no need to copy stuff around. Using the full path should be enough

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/actions.py'
--- hooks/actions.py 2015-09-28 01:17:48 +0000
+++ hooks/actions.py 2015-09-28 22:42:18 +0000
@@ -209,6 +209,9 @@
209 filename209 filename
210 )210 )
211 dst = os.path.join('/usr/lib/nagios/plugins', filename)211 dst = os.path.join('/usr/lib/nagios/plugins', filename)
212 dst_dir = os.path.dirname(dst)
213 if not os.path.exists(dst_dir):
214 os.makedirs(dst_dir)
212 shutil.copy(src, dst)215 shutil.copy(src, dst)
213 os.chmod(dst, 0o755)216 os.chmod(dst, 0o755)
214 nrpe_compat = nrpe.NRPE()217 nrpe_compat = nrpe.NRPE()

Subscribers

People subscribed via source and target branches

to all changes: