Commits

Philip Jenvey  committed 96d6dfa

fix translation: backout 1043bb8b12f8 for now

  • Participants
  • Parent commits 8c97e81

Comments (0)

Files changed (1)

File pypy/module/posix/interp_posix.py

                 except OperationError, e:
                     # fall back to the original byte string
                     result_w[i] = w_bytes
-            return space.newlist(result_w)
         else:
             dirname = space.str0_w(w_dirname)
-            return space.newlist_str(rposix.listdir(dirname))
+            result = rposix.listdir(dirname)
+            result_w = [space.wrap(s) for s in result]
     except OSError, e:
         raise wrap_oserror2(space, e, w_dirname)
+    return space.newlist(result_w)
 
 def pipe(space):
     "Create a pipe.  Returns (read_end, write_end)."