Author: Matti Picus <matti.pi...@gmail.com>
Branch: buffer-interface2
Changeset: r87617:81cfdc497c7d
Date: 2016-10-07 16:29 +0300
http://bitbucket.org/pypy/pypy/changeset/81cfdc497c7d/

Log:    fix redundant condition, fixes first part of issue #2411 (arigato)

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -209,10 +209,7 @@
         w_impl = space.lookup(self, '__buffer__')
         if w_impl is None:
             # cpyext types that may have only old buffer interface
-            if flags & space.BUF_WRITABLE:
-                w_impl = space.lookup(self, '__wbuffer__')
-            else:
-                w_impl = space.lookup(self, '__wbuffer__')
+            w_impl = space.lookup(self, '__wbuffer__')
         if w_impl is not None:
             w_result = space.get_and_call_function(w_impl, self, 
                                         space.newint(flags))
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to