summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-03-22 12:56:27 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-03-22 12:56:27 (GMT)
commitb304764ba2e4b34ae63644030b3ca8b6942fc0ae (patch)
tree16c44e4e2cd8b4e555115f4bf7cff95accc963fe /Python
parent98ba7534322696250267438053fb36cea5b0a85f (diff)
parentab79c71f39485d7ddc058dfc3a9c3d02ec859c36 (diff)
downloadcpython-b304764ba2e4b34ae63644030b3ca8b6942fc0ae.zip
cpython-b304764ba2e4b34ae63644030b3ca8b6942fc0ae.tar.gz
cpython-b304764ba2e4b34ae63644030b3ca8b6942fc0ae.tar.bz2
merge 3.2
Diffstat (limited to 'Python')
-rw-r--r--Python/future.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 978dc25..89592e2 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -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);