From: Stéphane Graber Date: Fri, 1 Mar 2013 16:12:20 +0000 (-0500) Subject: python api_test: Drop use of @LXCPATH@ X-Git-Tag: lxc-0.9.0.rc1~2^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb4260d10df377deb64f4d2a5fc188890b01e66;p=thirdparty%2Flxc.git python api_test: Drop use of @LXCPATH@ The python api test script was using @LXCPATH@ for one of its checks. Now that the lxcpath is exposed by the lxc python module directly, this can be dropped and api_test.py can now become a simple python file without needing pre-processing by autoconf. Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/.gitignore b/.gitignore index e5bc5053d..bef5cd1d1 100644 --- a/.gitignore +++ b/.gitignore @@ -66,7 +66,6 @@ src/lxc/lxc-wait src/lxc/legacy/lxc-ls src/python-lxc/build/ -src/python-lxc/examples/api_test.py src/python-lxc/lxc/__init__.py src/python-lxc/lxc/__pycache__/ diff --git a/configure.ac b/configure.ac index 88959ff84..792aae860 100644 --- a/configure.ac +++ b/configure.ac @@ -384,7 +384,6 @@ AC_CONFIG_FILES([ src/python-lxc/Makefile src/python-lxc/lxc/__init__.py - src/python-lxc/examples/api_test.py src/lua-lxc/Makefile diff --git a/src/python-lxc/examples/api_test.py.in b/src/python-lxc/examples/api_test.py similarity index 98% rename from src/python-lxc/examples/api_test.py.in rename to src/python-lxc/examples/api_test.py index 7711291ee..367bb7ab9 100644 --- a/src/python-lxc/examples/api_test.py.in +++ b/src/python-lxc/examples/api_test.py @@ -30,7 +30,6 @@ import uuid import sys # Some constants -LXC_PATH_LIB = "@LXCPATH@" LXC_TEMPLATE = "ubuntu" # Let's pick a random name, avoiding clashes @@ -43,7 +42,7 @@ container = lxc.Container(CONTAINER_NAME) # A few basic checks of the current state assert(container.config_file_name == "%s/%s/config" % - (LXC_PATH_LIB, CONTAINER_NAME)) + (lxc.default_config_path, CONTAINER_NAME)) assert(not container.defined) assert(container.init_pid == -1) assert(container.name == CONTAINER_NAME)