diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-08-08 07:57:44 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-08-08 07:57:44 +0000 |
commit | 663aaf5ee1150ea15f9314f11d5272eb23ab5901 (patch) | |
tree | 1141d3b1bbe61f3a1681903704a1141902a7dbf8 /dmidecode.c | |
parent | bea781c97b383c90df7e201d27709017f680374b (diff) | |
download | python-dmidecode-663aaf5ee1150ea15f9314f11d5272eb23ab5901.tar.gz python-dmidecode-663aaf5ee1150ea15f9314f11d5272eb23ab5901.tar.xz python-dmidecode-663aaf5ee1150ea15f9314f11d5272eb23ab5901.zip |
Anoher bug fix, this time in baseboard.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@65 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmidecode.c')
-rw-r--r-- | dmidecode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dmidecode.c b/dmidecode.c index 68185a5..4f79ba1 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -396,13 +396,14 @@ static PyObject *dmi_base_board_features(u8 code) { }; PyObject *data; - if((code&0x1F)==0) data = PyString_FromString("None"); + if((code&0x1F)==0) data = Py_None; else { int i; - data = PyList_New(4); - for(i=0; i<=4; i++) - if(code&(1<<i)) - PyList_SET_ITEM(data, i, PyString_FromString(features[i])); + data = PyList_New(5); + for(i=0; i<=4; i++) { + if(code&(1<<i)) PyList_SET_ITEM(data, i, PyString_FromString(features[i])); + else PyList_SET_ITEM(data, i, Py_None); + } } return data; } |