Author: Brian Kearns <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit