summaryrefslogtreecommitdiff
path: root/Python/future.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-16 17:51:17 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-16 17:51:17 +0300
commitca2fbf79712704df53b6a35902dfb898ef5ff0c7 (patch)
tree5eb5cd45b334eb0e06d4133c47feae1feb9cda4a /Python/future.c
parent0a90ca70c8aa04bf47777088baed8e1d6acaadea (diff)
parentf93daabc06d2966489c85bf24b4542da99b55049 (diff)
downloadcpython-ca2fbf79712704df53b6a35902dfb898ef5ff0c7.tar.gz
Issue #26783: test_os.WalkTests.test_walk_topdown did't test fwalk and bytes.
Patch by Aviv Palivoda.
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 163f87f673..75f210769e 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -79,7 +79,10 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename)
i = 0;
first = (stmt_ty)asdl_seq_GET(mod->v.Module.body, i);
- if (first->kind == Expr_kind && first->v.Expr.value->kind == Str_kind)
+ if (first->kind == Expr_kind
+ && (first->v.Expr.value->kind == Str_kind
+ || (first->v.Expr.value->kind == Constant_kind
+ && PyUnicode_CheckExact(first->v.Expr.value->v.Constant.value))))
i++;