Don't ignore unexpected exceptions.  Have the mock report the playback errors inline with the other calls.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4458 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/cli/threads.py b/cli/threads.py
index 7738b0a..eabefca 100644
--- a/cli/threads.py
+++ b/cli/threads.py
@@ -56,7 +56,7 @@
     def _start_threads(self, nthreads):
         """ Start up threads to spawn workers. """
         self.numthreads += nthreads
-        for i in range(nthreads):
+        for i in xrange(nthreads):
             thread = threading.Thread(target=self._new_worker)
             thread.setDaemon(True)
             self.threads.put(thread)
@@ -72,7 +72,7 @@
                 return
             try:
                 self.function(data)
-            except Exception:
-                # We don't want one function that raises to kill everything.
-                # TODO: Maybe keep a list of errors or something?
-                pass
+            except Exception, full_error:
+                # Put a catch all here.
+                print ('Unexpected failure in the thread calling %s: %s' %
+                       (self.function.__name__, full_error))