diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/sysmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 33255ad..fdf361f 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -259,8 +259,9 @@ sys_getfilesystemencoding(PyObject *self) { if (Py_FileSystemDefaultEncoding) return PyUnicode_FromString(Py_FileSystemDefaultEncoding); - Py_INCREF(Py_None); - return Py_None; + PyErr_SetString(PyExc_RuntimeError, + "filesystem encoding is not initialized"); + return NULL; } PyDoc_STRVAR(getfilesystemencoding_doc, |