summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index b084e01..ddcd0a0 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1246,6 +1246,7 @@ ast_for_atom(struct compiling *c, const node *n)
case STRING: {
PyObject *str = parsestrplus(c, n);
if (!str) {
+#ifdef Py_USING_UNICODE
if (PyErr_ExceptionMatches(PyExc_UnicodeError)){
PyObject *type, *value, *tback, *errstr;
PyErr_Fetch(&type, &value, &tback);
@@ -1263,6 +1264,7 @@ ast_for_atom(struct compiling *c, const node *n)
Py_DECREF(value);
Py_XDECREF(tback);
}
+#endif
return NULL;
}
PyArena_AddPyObject(c->c_arena, str);