[lxc-devel] [PATCH] lxc-ls: Force running against containers without python
Serge Hallyn
serge.hallyn at ubuntu.com
Mon May 5 16:33:54 UTC 2014
Quoting Stéphane Graber (stgraber at ubuntu.com):
> 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
No idea what this is :) My only question would be, does this mean we need
any new dependencies? If so, then 'assert' may be a bit strong for existing
users, since they may have python in all their nested containers...
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> 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
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list