summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-25 21:16:10 (GMT)
committerGitHub <noreply@github.com>2017-12-25 21:16:10 (GMT)
commite0aef4f3cd339a405d2a7fbd35a50afa64834f84 (patch)
tree3d141ffc779ca6159b2e193d95ef6e76509612ae /Modules
parent3070b71e5eedf62e49b8e7dedab75742a5f67ece (diff)
downloadcpython-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.zip
cpython-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.tar.gz
cpython-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.tar.bz2
bpo-31721: Allow Future._log_traceback to only be set to False (#5009)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_asynciomodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index f8165ab..5ec4ad1 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -1058,6 +1058,11 @@ FutureObj_set_log_traceback(FutureObj *fut, PyObject *val)
if (is_true < 0) {
return -1;
}
+ if (is_true) {
+ PyErr_SetString(PyExc_ValueError,
+ "_log_traceback can only be set to False");
+ return -1;
+ }
fut->fut_log_tb = is_true;
return 0;
}