diff options
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index aebae1c..c583edf 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -956,10 +956,7 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f) FILE *fp; PyObject *readmethod = NULL; - if (PyFile_Check(f)) { - fp = PyFile_AsFile(f); - } - else { + { fp = NULL; readmethod = PyObject_GetAttrString(f, "read"); if (readmethod == NULL) { |