summaryrefslogtreecommitdiffstats
path: root/src/dmidecodemodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dmidecodemodule.c')
-rw-r--r--src/dmidecodemodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c
index fc3a7ed..14ff148 100644
--- a/src/dmidecodemodule.c
+++ b/src/dmidecodemodule.c
@@ -256,7 +256,9 @@ static PyObject *dmidecode_get(PyObject *self, const char *section)
}
mapping = dmiMAP_ParseMappingXML(opt.mappingxml, section);
- assert( mapping != NULL );
+ if( mapping == NULL ) {
+ return NULL;
+ }
// Generate Python dict out of XML node
pydata = pythonizeXMLnode(mapping, dmixml_n);