Merge ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master into ~livepatch-charmers/charm-canonical-livepatch:master

Proposed by Barry Price
Status: Merged
Approved by: Junien F
Approved revision: 4fd4e1dd44ef6f398e651c2cf99b89426c1e2676
Merged at revision: 4a771f94bc8f0de472b8fbff4aaba6d54c0140a1
Proposed branch: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master
Merge into: ~livepatch-charmers/charm-canonical-livepatch:master
Diff against target: 26 lines (+2/-2)
2 files modified
files/check_canonical-livepatch.py (+1/-1)
reactive/canonical_livepatch.py (+1/-1)
Reviewer Review Type Date Requested Status
Junien F Approve
Review via email: mp+356057@code.launchpad.net

Commit message

Drop universal_newlines in the Nagios check, force UTF-8 (the livepatch client emits unicode output)

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Junien F (axino) wrote :

+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4a771f94bc8f0de472b8fbff4aaba6d54c0140a1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/check_canonical-livepatch.py b/files/check_canonical-livepatch.py
2index 0d2a1a3..cafd472 100755
3--- a/files/check_canonical-livepatch.py
4+++ b/files/check_canonical-livepatch.py
5@@ -14,7 +14,7 @@ def check_snap_installed():
6 """Confirm the snap is installed, raise an error if not"""
7 cmd = ['snap', 'list', 'canonical-livepatch']
8 try:
9- check_output(cmd, universal_newlines=True)
10+ check_output(cmd).decode('UTF-8')
11 except Exception:
12 raise nagios_plugin3.CriticalError('canonical-livepatch snap is not installed')
13
14diff --git a/reactive/canonical_livepatch.py b/reactive/canonical_livepatch.py
15index e8ba806..c933113 100644
16--- a/reactive/canonical_livepatch.py
17+++ b/reactive/canonical_livepatch.py
18@@ -169,7 +169,7 @@ def livepatch_supported():
19
20
21 @when('canonical-livepatch.supported')
22-@when_not('snap.livepatch.installed')
23+@when_not('snap.installed.canonical-livepatch')
24 def install_livepatch():
25 config = hookenv.config()
26 snap_channel = config.get('snap_channel')

Subscribers

People subscribed via source and target branches