Commit 60fd53be authored by Denis Bilenko's avatar Denis Bilenko

stathelper.c: report import error instead of crashing (on Windows)

parent b841c382
......@@ -89,10 +89,14 @@ static PyObject*
_pystat_fromstructstat(STRUCT_STAT *st)
{
unsigned long ansec, mnsec, cnsec;
PyObject *v;
PyTypeObject* StatResultType = (PyTypeObject*)import_StatResultType();
if (StatResultType == NULL) {
return NULL;
}
PyObject *v = PyStructSequence_New(StatResultType);
v = PyStructSequence_New(StatResultType);
if (v == NULL)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment