Kaydet (Commit) b304764b authored tarafından Benjamin Peterson's avatar Benjamin Peterson

merge 3.2

......@@ -87,7 +87,8 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename)
if (s->kind == ImportFrom_kind) {
PyObject *modname = s->v.ImportFrom.module;
if (!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
if (modname &&
!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
if (done) {
PyErr_SetString(PyExc_SyntaxError,
ERR_LATE_FUTURE);
......
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