[pypy-svn] r70292 - pypy/trunk/pypy/tool
afa at codespeak.net
afa at codespeak.net
Mon Dec 28 00:29:42 CET 2009
Author: afa
Date: Mon Dec 28 00:29:41 2009
New Revision: 70292
Modified:
pypy/trunk/pypy/tool/udir.py
Log:
Ensure that the prefix used to name the usession-xxx directory is not a unicode string.
Otherwise a unicode filename is built and compared to the content of os.listdir('/tmp'),
which fails if it contains some file with non-ascii-7 letters.
Modified: pypy/trunk/pypy/tool/udir.py
==============================================================================
--- pypy/trunk/pypy/tool/udir.py (original)
+++ pypy/trunk/pypy/tool/udir.py Mon Dec 28 00:29:41 2009
@@ -18,7 +18,7 @@
#
import autopath
-import os
+import os, sys
import py
from py.path import local
@@ -39,6 +39,8 @@
try:
p = py.path.local(__file__).dirpath()
basename = svn_info(py.path.svnwc(p).info().url)
+ if isinstance(basename, unicode):
+ basename = basename.encode(sys.getdefaultencoding())
except:
basename = ''
if not basename.startswith('-'):
More information about the Pypy-commit
mailing list