Author: Armin Rigo <[email protected]>
Branch:
Changeset: r96361:8fba932de88a
Date: 2019-03-27 13:15 +0100
http://bitbucket.org/pypy/pypy/changeset/8fba932de88a/
Log: Fix the "not we_are_translated()" path, almost never used
diff --git a/pypy/module/gc/referents.py b/pypy/module/gc/referents.py
--- a/pypy/module/gc/referents.py
+++ b/pypy/module/gc/referents.py
@@ -20,7 +20,7 @@
# inherits from W_Root for internal reasons. Such instances don't
# have a typedef at all (or have a null typedef after translation).
if not we_are_translated():
- if not hasattr(w_obj, 'typedef'):
+ if getattr(w_obj, 'typedef', None) is None:
return None
else:
if w_obj is None or not w_obj.typedef:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit