summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-09-25 21:59:05 (GMT)
committerGuido van Rossum <guido@python.org>1992-09-25 21:59:05 (GMT)
commit3165fe6a56c07f4f85f4ea54b69f5b1f243e2463 (patch)
treee4721159db6fc00c4267e03c035b58b73c854fd5 /Python/sysmodule.c
parent3a40ae4ef3b3dd7f2967a63acceabb0d0ae251d7 (diff)
downloadcpython-3165fe6a56c07f4f85f4ea54b69f5b1f243e2463.zip
cpython-3165fe6a56c07f4f85f4ea54b69f5b1f243e2463.tar.gz
cpython-3165fe6a56c07f4f85f4ea54b69f5b1f243e2463.tar.bz2
Modified most (but not yet all) I/O to always go through sys.stdout or
sys.stderr or sys.stdin, and to work with any object as long as it has a write() (respectively readline()) methods. Some functions that took a FILE* argument now take an object* argument.
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 a83ec46..5dff38e 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -62,7 +62,7 @@ sysgetfile(name, def)
{
FILE *fp = NULL;
object *v = sysget(name);
- if (v != NULL)
+ if (v != NULL && is_fileobject(v))
fp = getfilefile(v);
if (fp == NULL)
fp = def;