Author: Brian Kearns <bdkea...@gmail.com> Branch: refactor-buffer-api Changeset: r70914:820aa0f69a94 Date: 2014-04-23 22:01 -0400 http://bitbucket.org/pypy/pypy/changeset/820aa0f69a94/
Log: fix translation diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py --- a/pypy/interpreter/baseobjspace.py +++ b/pypy/interpreter/baseobjspace.py @@ -1449,11 +1449,15 @@ try: buf = w_obj.buffer_w(self, 0) except TypeError: - try: - buf = w_obj.readbuf_w(self) - except TypeError: - self._getarg_error("string or buffer", w_obj) - return buf.as_str() + pass + else: + return buf.as_str() + try: + buf = w_obj.readbuf_w(self) + except TypeError: + self._getarg_error("string or buffer", w_obj) + else: + return buf.as_str() def str_or_None_w(self, w_obj): if self.is_w(w_obj, self.w_None): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit