[pypy-commit] pypy default: fix attrs test in vmprof for empty attrs lists

timfel pypy.commits at gmail.com
Mon Aug 22 10:44:21 EDT 2016


Author: Tim Felgentreff <timfelgentreff at gmail.com>
Branch: 
Changeset: r86421:6774c47a23c1
Date: 2016-08-22 14:04 +0200
http://bitbucket.org/pypy/pypy/changeset/6774c47a23c1/

Log:	fix attrs test in vmprof for empty attrs lists

diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py
--- a/rpython/rlib/rvmprof/rvmprof.py
+++ b/rpython/rlib/rvmprof/rvmprof.py
@@ -91,7 +91,7 @@
         immut = CodeClass.__dict__.get('_immutable_fields_', [])
         CodeClass._immutable_fields_ = list(immut) + ['_vmprof_unique_id']
         attrs = CodeClass.__dict__.get('_attrs_', None)
-        if attrs:
+        if attrs is not None:
             CodeClass._attrs_ = list(attrs) + ['_vmprof_unique_id']
         self._code_classes.add(CodeClass)
         #


More information about the pypy-commit mailing list