The changes to the error hierarchy in rev 1732 break the UnhandledError
class by changing the superclass but not properly adjusting the
superclass __init__ calls.

Also fixes up some inconsistent spacing introduced by the same patch.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1734 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index 25a9e9a..0950232 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -40,6 +40,7 @@
     exit_status="ERROR"
     pass
 
+
 class TestUnknownError(AutotestError):
     """Indicates an error which terminates and fails the test."""
     exit_status="FAIL"
@@ -52,11 +53,13 @@
     exit_status="TEST_NA"
     pass
 
+
 class TestFail(AutotestError):
     """Indicates that the test failed, but the job will not continue."""
     exit_status="FAIL"
     pass
 
+
 class TestWarn(AutotestError):
     """Indicates that bad things (may) have happened, but not an explicit
     failure."""
@@ -88,14 +91,14 @@
 class UnhandledError(TestUnknownError):
     """Indicates an unhandled exception in a test."""
     def __init__(self, unhandled_exception):
-        if isinstance(unhandled_exception, TestError):
-            TestError.__init__(self, *unhandled_exception.args)
+        if isinstance(unhandled_exception, AutotestError):
+            TestUnknownError.__init__(self, *unhandled_exception.args)
         else:
             msg = "Unhandled %s: %s"
             msg %= (unhandled_exception.__class__.__name__,
                     unhandled_exception)
             msg += "\n" + traceback.format_exc()
-            TestError.__init__(self, msg)
+            TestUnknownError.__init__(self, msg)
 
 
 class InstallError(JobError):