Merge ~peter-sabaini/charm-nagios:fix/lp1893434 into ~nagios-charmers/charm-nagios:master

Proposed by Peter Sabaini
Status: Merged
Approved by: Paul Goins
Approved revision: a8e9291941a1b3f27d762b5fe82571a03d3509a2
Merged at revision: a8e9291941a1b3f27d762b5fe82571a03d3509a2
Proposed branch: ~peter-sabaini/charm-nagios:fix/lp1893434
Merge into: ~nagios-charmers/charm-nagios:master
Diff against target: 18 lines (+7/-0)
1 file modified
hooks/upgrade_charm.py (+7/-0)
Reviewer Review Type Date Requested Status
Paul Goins Approve
Facundo Ciccioli Approve
Review via email: mp+391308@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Facundo Ciccioli (fandanbango) wrote :

I've verified that without this MR, running upgrade-charm will leave the charm in error state.

Including the MR renders the charm properly upgradable.

review: Approve
Revision history for this message
Paul Goins (vultaire) :
review: Approve
Revision history for this message
Paul Goins (vultaire) wrote :

Released as cs:~llama-charmers-next/nagios-8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/upgrade_charm.py b/hooks/upgrade_charm.py
2index ca410ef..4152e53 100755
3--- a/hooks/upgrade_charm.py
4+++ b/hooks/upgrade_charm.py
5@@ -13,6 +13,13 @@ import stat
6 import string
7 import subprocess
8
9+try:
10+ from enum import Enum # noqa: F401
11+except ImportError:
12+ subprocess.check_call(
13+ "DEBIAN_FRONTEND=noninteractive apt-get -qy install python-enum34", shell=True
14+ )
15+
16 from charmhelpers import fetch
17 from charmhelpers.contrib import ssl
18 from charmhelpers.core import hookenv, host

Subscribers

People subscribed via source and target branches