summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 10:09:31 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 10:09:31 +0200
commit0600ebc4d9a0fbb0f16689fb2c1d6a09482594cc (patch)
tree344429f0f5a016baea2bcd0c5b5952cccdcef942 /Python/sysmodule.c
parent881f3319420fd3195c53cc5609808cd6e612837a (diff)
downloadcpython-0600ebc4d9a0fbb0f16689fb2c1d6a09482594cc.tar.gz
Issue #23752: _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 471389cf57..9ec25216ed 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1690,7 +1690,7 @@ _PySys_Init(void)
#if !defined(MS_WINDOWS)
{
struct _Py_stat_struct sb;
- if (_Py_fstat(fileno(stdin), &sb) == 0 &&
+ if (_Py_fstat_noraise(fileno(stdin), &sb) == 0 &&
S_ISDIR(sb.st_mode)) {
/* There's nothing more we can do. */
/* Py_FatalError() will core dump, so just exit. */