Author: Philip Jenvey <pjen...@underboss.org>
Branch: py3k
Changeset: r84737:d48c62452f34
Date: 2016-05-27 12:27 -0700
http://bitbucket.org/pypy/pypy/changeset/d48c62452f34/

Log:    fix the error message

diff --git a/pypy/module/zipimport/interp_zipimport.py 
b/pypy/module/zipimport/interp_zipimport.py
--- a/pypy/module/zipimport/interp_zipimport.py
+++ b/pypy/module/zipimport/interp_zipimport.py
@@ -292,8 +292,8 @@
             # from the zlib module: let's to the same
             raise zlib_error(space, e.msg)
 
-    @unwrap_spec(fullname='fsencode')
-    def get_code(self, space, fullname):
+    def get_code(self, space, w_fullname):
+        fullname = space.fsencode_w(w_fullname)
         filename = self.make_filename(fullname)
         for compiled, _, ext in ENUMERATE_EXTS:
             if self.have_modulefile(space, filename + ext):
@@ -314,8 +314,8 @@
                         space, co_filename, source)
                 return space.wrap(code_w)
         raise oefmt(get_error(space),
-                    "Cannot find source or code for %s in %R",
-                    filename, space.wrap_fsdecoded(self.name))
+                    "Cannot find source or code for %R in %R",
+                    w_fullname, space.wrap_fsdecoded(self.name))
 
     @unwrap_spec(fullname='fsencode')
     def get_source(self, space, fullname):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to