Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r64958:a2aada708ad4
Date: 2013-06-23 19:37 +0200
http://bitbucket.org/pypy/pypy/changeset/a2aada708ad4/

Log:    Silence the strangest RPython warning so far: "prebuilt instance
        Ellipsis has no attribute 'errno'"

diff --git a/rpython/rtyper/lltypesystem/rclass.py 
b/rpython/rtyper/lltypesystem/rclass.py
--- a/rpython/rtyper/lltypesystem/rclass.py
+++ b/rpython/rtyper/lltypesystem/rclass.py
@@ -442,8 +442,10 @@
                     except AttributeError:
                         attrvalue = 
self.classdef.classdesc.read_attribute(name, None)
                         if attrvalue is None:
-                            warning("prebuilt instance %r has no attribute %r" 
% (
-                                    value, name))
+                            # Ellipsis from get_reusable_prebuilt_instance()
+                            if value is not Ellipsis:
+                                warning("prebuilt instance %r has no "
+                                        "attribute %r" % (value, name))
                             llattrvalue = r.lowleveltype._defl()
                         else:
                             llattrvalue = r.convert_desc_or_const(attrvalue)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to