diff options
author | David Sommerseth <davids@redhat.com> | 2009-06-10 19:30:28 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-06-10 19:30:28 +0200 |
commit | 541ee10989640f028d777c9341c63573aac4a55f (patch) | |
tree | 830a829d75d1f3cbcbf1aede838f4238523745fe /src/dmidecodemodule.c | |
parent | a05ca0f0e588031bde35143ba27481f2c5fdea70 (diff) | |
download | python-dmidecode-541ee10989640f028d777c9341c63573aac4a55f.tar.gz python-dmidecode-541ee10989640f028d777c9341c63573aac4a55f.tar.xz python-dmidecode-541ee10989640f028d777c9341c63573aac4a55f.zip |
Discovered another issue with Python and imports
The shard library got renamed to dmidecodemodule.so, and this was not
clever. When you do 'import dmidecode' in Python, it will look for
files in this order:
dmidecode
dmidecode.so
dmidecodemodule.so
dmidecode.py
dmidecode.pyc
This is of course a problem when the wrapper introduced in commit
65c9384ec9b6e265aba11227ffa37ae7a6a787d1 is called dmidecode.py, and
Python attempts to load dmidecodemodule.so before dmidecode.py.
To solve this, dmidecodemodule.so is now renamed to dmidecodemod.so.
Diffstat (limited to 'src/dmidecodemodule.c')
-rw-r--r-- | src/dmidecodemodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c index 032a189..d0c7043 100644 --- a/src/dmidecodemodule.c +++ b/src/dmidecodemodule.c @@ -676,7 +676,7 @@ void destruct_options(void *ptr) } -PyMODINIT_FUNC initdmidecodemodule(void) +PyMODINIT_FUNC initdmidecodemod(void) { char *dmiver = NULL; PyObject *module = NULL; @@ -689,7 +689,7 @@ PyMODINIT_FUNC initdmidecodemodule(void) opt = (options *) malloc(sizeof(options)+2); memset(opt, 0, sizeof(options)+2); init(opt); - module = Py_InitModule3((char *)"dmidecodemodule", DMIDataMethods, + module = Py_InitModule3((char *)"dmidecodemod", DMIDataMethods, "Python extension module for dmidecode"); version = PyString_FromString("3.10.6"); |