From: Stéphane Graber Date: Mon, 5 May 2014 15:51:19 +0000 (-0500) Subject: lxc-ls: Force running against containers without python X-Git-Tag: lxc-1.0.4~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c996827d525b6906978604c6356194113ed4393;p=thirdparty%2Flxc.git lxc-ls: Force running against containers without python 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 Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in index fa387b3cf..fe2252847 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@"