summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/patches/fix-fast-py3cc.patch
blob: 601bdf06a36cdc4cad99e08550102816a3a027b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- contrib/tools/python3/Python/codecs.c	(index)
+++ contrib/tools/python3/Python/codecs.c	(working tree)
@@ -138,6 +138,9 @@ PyObject *_PyCodec_Lookup(const char *encoding)
     }
 
     PyInterpreterState *interp = _PyInterpreterState_GET();
+    if (!interp->codecs.initialized) {
+        return NULL;
+    }
     assert(interp->codecs.initialized);
 
     /* Convert the encoding to a normalized Python string: all