[pypy-commit] pypy use-file-star-for-file: fix fdopen directory
bdkearns
noreply at buildbot.pypy.org
Thu Sep 11 04:56:23 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73441:5cd637dc010a
Date: 2014-09-10 22:56 -0400
http://bitbucket.org/pypy/pypy/changeset/5cd637dc010a/
Log: fix fdopen directory
diff --git a/pypy/module/_file/interp_file.py b/pypy/module/_file/interp_file.py
--- a/pypy/module/_file/interp_file.py
+++ b/pypy/module/_file/interp_file.py
@@ -244,6 +244,10 @@
self.direct_fdopen(fd, mode, buffering)
except ValueError as e:
raise OperationError(self.space.w_ValueError, self.space.wrap(str(e)))
+ except IOError as e:
+ space = self.space
+ w_error = space.call_function(space.w_IOError, space.wrap(e.errno), space.wrap(e.strerror), self.w_name)
+ raise OperationError(space.w_IOError, w_error)
except OSError as e:
raise wrap_oserror(self.space, e)
More information about the pypy-commit
mailing list