[pypy-commit] pypy py3k: assert_str0 stat paths
pjenvey
noreply at buildbot.pypy.org
Thu Mar 15 06:23:05 CET 2012
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r53670:7ea913fe4d85
Date: 2012-03-14 22:22 -0700
http://bitbucket.org/pypy/pypy/changeset/7ea913fe4d85/
Log: assert_str0 stat paths
diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -12,6 +12,7 @@
from pypy.interpreter.eval import Code
from pypy.interpreter.pycode import PyCode
from pypy.rlib import streamio, jit
+from pypy.rlib.rstring import assert_str0
from pypy.rlib.streamio import StreamErrors
from pypy.rlib.objectmodel import we_are_translated, specialize
from pypy.module.sys.version import PYPY_VERSION
@@ -931,7 +932,7 @@
if py is None:
py = filename[:-1]
try:
- st = os.stat(py)
+ st = os.stat(assert_str0(py))
except OSError:
pass
else:
@@ -950,7 +951,7 @@
if space.config.objspace.usepycfiles:
cpathname = make_compiled_pathname(pathname)
- src_stat = os.stat(pathname)
+ src_stat = os.stat(assert_str0(pathname))
mtime = int(src_stat[stat.ST_MTIME])
mode = src_stat[stat.ST_MODE]
stream = check_compiled_module(space, cpathname, mtime)
More information about the pypy-commit
mailing list