Commits

Ned Batchelder committed 2d00e62

Fix #201: wrong default for traces0 being missing.

Comments (0)

Files changed (2)

   HTML report would fail with a UnicodeDecodeError. This issue (`issue 193`_)
   is now fixed.
 
+- Running coverage under a debugger is unlikely to work, but it shouldn't fail
+  with "TypeError: 'NoneType' object is not iterable".  Fixes `issue 201`_.
+
 .. _issue 193: https://bitbucket.org/ned/coveragepy/issue/193/unicodedecodeerror-on-htmlpy
+.. _issue 201: https://bitbucket.org/ned/coveragepy/issue/201/coverage-using-django-14-with-pydb-on
 
 
 Version 3.5.3 --- 29 September 2012

coverage/collector.py

             if fn0:
                 tracer0 = getattr(fn0, '__self__', None)
                 if tracer0:
-                    traces0 = getattr(tracer0, 'traces', None)
+                    traces0 = getattr(tracer0, 'traces', [])
 
         # Install the tracer on this thread.
         fn = self._start_tracer()