[lxc-devel] [PATCH] lxc-ls: Force running against containers without python
Stéphane Graber
stgraber at ubuntu.com
Mon May 5 16:07:29 UTC 2014
When using --nesting, we exec ourselves in the container context, if we
somehow need to dynamically-load modules from there, things break. So
make sure we pre-load everything we may need.
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
src/lxc/lxc-ls.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in
index d1faaa2..a8f3256 100755
--- a/src/lxc/lxc-ls.in
+++ b/src/lxc/lxc-ls.in
@@ -38,6 +38,10 @@ import sys
_ = gettext.gettext
gettext.textdomain("lxc-ls")
+# Required for containers without python
+import encodings.ascii
+assert encodings.ascii
+
# Constants
LXCPATH = "@LXCPATH@"
RUNTIME_PATH = "@RUNTIME_PATH@"
--
1.9.1
More information about the lxc-devel
mailing list