1. Tobias Oberstein
  2. pypy

Commits

Philip Jenvey  committed 7ea913f

assert_str0 stat paths

  • Participants
  • Parent commits 0d2a123
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/imp/importing.py

View file
  • Ignore whitespace
 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
     if py is None:
         py = filename[:-1]
     try:
-        st = os.stat(py)
+        st = os.stat(assert_str0(py))
     except OSError:
         pass
     else:
 
     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)