summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 1e4907a..07579aa 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -2736,6 +2736,8 @@ static PyObject *charmapencode_lookup(Py_UNICODE c, PyObject *mapping)
} else
return NULL;
}
+ else if (x == Py_None)
+ return x;
else if (PyInt_Check(x)) {
long value = PyInt_AS_LONG(x);
if (value < 0 || value > 255) {