287 # threads. |
287 # threads. |
288 threading.settrace(self._installation_trace) |
288 threading.settrace(self._installation_trace) |
289 |
289 |
290 def stop(self): |
290 def stop(self): |
291 """Stop collecting trace information.""" |
291 """Stop collecting trace information.""" |
292 #print >>sys.stderr, "Stopping: %r" % self._collectors |
292 #print("Stopping: %r" % self._collectors, file=sys.stderr) |
|
293 if not self._collectors: |
|
294 return |
293 assert self._collectors |
295 assert self._collectors |
294 assert self._collectors[-1] is self |
296 assert self._collectors[-1] is self |
295 |
297 |
296 self.pause() |
298 self.pause() |
297 self.tracers = [] |
299 self.tracers = [] |