← Back to team overview

livepatch-charmers team mailing list archive

[Merge] ~hloeung/canonical-livepatch-charm:master into canonical-livepatch-charm:master

 

Haw Loeung has proposed merging ~hloeung/canonical-livepatch-charm:master into canonical-livepatch-charm:master.

Requested reviews:
  Livepatch charm developers (livepatch-charmers)

For more details, see:
https://code.launchpad.net/~hloeung/canonical-livepatch-charm/+git/canonical-livepatch-charm/+merge/329785

Fixed systemd-detect-virt to output nothing, not even 'none'
-- 
Your team Livepatch charm developers is requested to review the proposed merge of ~hloeung/canonical-livepatch-charm:master into canonical-livepatch-charm:master.
diff --git a/files/check_canonical-livepatch.py b/files/check_canonical-livepatch.py
index 5b017ef..aabe681 100755
--- a/files/check_canonical-livepatch.py
+++ b/files/check_canonical-livepatch.py
@@ -97,7 +97,7 @@ def is_container():
     """
     if init_is_systemd():
         # Detect using systemd-detect-virt
-        return call(['systemd-detect-virt', '--container']) == 0
+        return call(['systemd-detect-virt', '--container', '--quiet']) == 0
     else:
         # Detect using upstart container file marker
         return os.path.exists('/run/container_type')

Follow ups