Issue #201 resolved

coverage using django 1.4 with pydb on

Anonymous created an issue

I'm getting a crash when running coverage with django 1.4 under eclipse, i.e. under the debugger. At issue seems to be this line: traces0 = getattr(tracer0, 'traces', None)

In my case, there appears to be no traces, so traces0 is None, but then we try to iterate over it in the next section: (261): for args in traces0:

Seems the getattr should be getattr(tracer0, 'traces', []), instead of None.

However, it's also entirely possible that running under pydb is not supported.


P.S. File "/Library/Python/2.7/site-packages/coverage-3.5.3-py2.7-macosx-10.8-intel.egg/coverage/", line 383, in start self.collector.start() File "/Library/Python/2.7/site-packages/coverage-3.5.3-py2.7-macosx-10.8-intel.egg/coverage/", line 261, in start for args in traces0: TypeError: 'NoneType' object is not iterable

Comments (2)

  1. Ned Batchelder repo owner

    Hmm, i don't know pydb, and it's likely that you can't debug with coverage running anyway, since both want to use trace functions. But, you are right, the default of [] seems correct, and None seems bad.

    Fixed in <<changeset 2d00e627d48d>>.

  2. Log in to comment