diff options
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 50b3cd676f..e195450db2 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -207,15 +207,6 @@ open_the_file(PyFileObject *f, char *name, char *mode) goto cleanup; } - /* rexec.py can't stop a user from getting the file() constructor -- - all they have to do is get *any* file object f, and then do - type(f). Here we prevent them from doing damage with it. */ - if (PyEval_GetRestricted()) { - PyErr_SetString(PyExc_IOError, - "file() constructor not accessible in restricted mode"); - f = NULL; - goto cleanup; - } errno = 0; #ifdef MS_WINDOWS |