[pypy-svn] r64291 - pypy/trunk/pypy/module/posix
afa at codespeak.net
afa at codespeak.net
Fri Apr 17 18:25:43 CEST 2009
Author: afa
Date: Fri Apr 17 18:25:42 2009
New Revision: 64291
Modified:
pypy/trunk/pypy/module/posix/app_posix.py
Log:
On windows, os.popen() accepts unicode containing ascii-only chars.
This fixes test_uuid
Modified: pypy/trunk/pypy/module/posix/app_posix.py
==============================================================================
--- pypy/trunk/pypy/module/posix/app_posix.py (original)
+++ pypy/trunk/pypy/module/posix/app_posix.py Fri Apr 17 18:25:42 2009
@@ -147,6 +147,9 @@
Open a pipe to/from a command returning a file object."""
+ if isinstance(cmd, unicode):
+ cmd = cmd.encode('ascii')
+
if not isinstance(cmd, str):
raise TypeError("invalid cmd type (%s, expected string)" %
(type(cmd),))
More information about the Pypy-commit
mailing list