Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
24fcdb39
Commit
24fcdb39
authored
Mar 11, 2013
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python: Don't hardcode LXCPATH in python module
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
0d03360a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
.gitignore
.gitignore
+0
-1
configure.ac
configure.ac
+0
-1
lxc.c
src/python-lxc/lxc.c
+13
-1
__init__.py
src/python-lxc/lxc/__init__.py
+1
-2
No files found.
.gitignore
View file @
24fcdb39
...
...
@@ -66,7 +66,6 @@ src/lxc/lxc-wait
src/lxc/legacy/lxc-ls
src/python-lxc/build/
src/python-lxc/lxc/__init__.py
src/python-lxc/lxc/__pycache__/
src/tests/lxc-test-containertests
...
...
configure.ac
View file @
24fcdb39
...
...
@@ -383,7 +383,6 @@ AC_CONFIG_FILES([
src/lxc/lxc.functions
src/python-lxc/Makefile
src/python-lxc/lxc/__init__.py
src/lua-lxc/Makefile
...
...
src/python-lxc/lxc.c
View file @
24fcdb39
...
...
@@ -95,6 +95,12 @@ Container_init(Container *self, PyObject *args, PyObject *kwds)
return
0
;
}
static
PyObject
*
get_default_config_path
(
Container
*
self
,
PyObject
*
args
,
PyObject
*
kwds
)
{
return
PyUnicode_FromString
(
lxc_get_default_config_path
());
}
// Container properties
static
PyObject
*
Container_config_file_name
(
Container
*
self
,
PyObject
*
args
,
PyObject
*
kwds
)
...
...
@@ -628,12 +634,18 @@ PyVarObject_HEAD_INIT(NULL, 0)
Container_new
,
/* tp_new */
};
static
PyMethodDef
LXC_methods
[]
=
{
{
"get_default_config_path"
,
(
PyCFunction
)
get_default_config_path
,
METH_NOARGS
,
"Returns the current LXC config path"
},
{
NULL
,
NULL
,
0
,
NULL
}
};
static
PyModuleDef
_lxcmodule
=
{
PyModuleDef_HEAD_INIT
,
"_lxc"
,
"Binding for liblxc in python"
,
-
1
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
LXC_methods
};
PyMODINIT_FUNC
...
...
src/python-lxc/lxc/__init__.py
.in
→
src/python-lxc/lxc/__init__.py
View file @
24fcdb39
...
...
@@ -26,14 +26,13 @@ import glob
import
os
import
subprocess
import
stat
import tempfile
import
time
import
warnings
warnings
.
warn
(
"The python-lxc API isn't yet stable "
"and may change at any point in the future."
,
Warning
,
2
)
default_config_path =
"@LXCPATH@"
default_config_path
=
_lxc
.
get_default_config_path
()
class
ContainerNetwork
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment