Skip to content

Commit

Permalink
lxc-ls: Force running against containers without python
Browse files Browse the repository at this point in the history
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@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
stgraber committed May 5, 2014
1 parent fb80642 commit 2c99682
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lxc/lxc-ls.in
Expand Up @@ -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@"
Expand Down

0 comments on commit 2c99682

Please sign in to comment.