Author: andrewjlawrence
Branch: winconsoleio
Changeset: r97515:6257428ac55f
Date: 2019-09-17 14:41 +0100
http://bitbucket.org/pypy/pypy/changeset/6257428ac55f/

Log:    Switched fsdecode call to fspath following other pypy io modules

diff --git a/pypy/module/_io/interp_win32consoleio.py 
b/pypy/module/_io/interp_win32consoleio.py
--- a/pypy/module/_io/interp_win32consoleio.py
+++ b/pypy/module/_io/interp_win32consoleio.py
@@ -203,10 +203,10 @@
             closefd = space.bool_w(w_closefd)
 
             if self.fd < 0:
-                
-                w_decodedname = space.fsdecode(w_nameobj)
-                name = space.unicode2wcharp(w_decodedname)
-                console_type = _pyio_get_console_type(space, w_decodedname)
+                from pypy.module.posix.interp_posix import fspath
+                w_path = fspath(space, w_nameobj)
+                name = rffi.unicode2wcharp(space.utf8_w(w_path))
+                console_type = _pyio_get_console_type(space, w_path)
                 if not console_type:
                     raise oefmt(space.w_ValueError,
                             "Invalid console type")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to