Move error.py'>error.py'>error.py out of the client and server and into common_lib.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1003 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/error.py b/server/error.py
index d82775b..e69de29 100755
--- a/server/error.py
+++ b/server/error.py
@@ -1,42 +0,0 @@
-"""
-Internal global error types
-"""
-
-import sys
-from traceback import format_exception
-
-def format_error():
-        t, o, tb = sys.exc_info()
-        trace = format_exception(t, o, tb)
-        # Clear the backtrace to prevent a circular reference
-        # in the heap -- as per tutorial
-        tb = ''
-
-        return ''.join(trace)
-
-class JobContinue(SystemExit):
-	"""Allow us to bail out requesting continuance."""
-	pass
-
-class AutotestError(Exception):
-	"""The parent of all errors deliberatly thrown within the client code."""
-	pass
-
-class JobError(AutotestError):
-	"""Indicates an error which terminates and fails the whole job."""
-	pass
-
-class TestError(AutotestError):
-	"""Indicates an error which terminates and fails the test."""
-	pass
-
-class CmdError(TestError):
-	"""Indicates that a command failed, is fatal to the test unless caught."""
-	def __str__(self):
-		return "Command <" + self.args[0] + "> failed, rc=%d" % (self.args[1])
-
-class UnhandledError(TestError):
-	"""Indicates an unhandled exception in a test."""
-	def __init__(self, prefix):
-		msg = prefix + format_error()
-		TestError.__init__(self, msg)
diff --git a/server/server_job.py b/server/server_job.py
index e96fa0f..fb73412 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -14,7 +14,7 @@
 import os, sys, re, time
 import test, errors
 from utils import *
-from error import *
+from common.error import *
 
 # this magic incantation should give us access to a client library
 server_dir = os.path.dirname(__file__)
diff --git a/server/test.py b/server/test.py
index 6a81b90..ebebe0d 100755
--- a/server/test.py
+++ b/server/test.py
@@ -20,7 +20,7 @@
 
 import os, pickle, tempfile, re
 from subcommand import *
-from error import *
+from common.error import *
 from utils import *
 
 class test:
diff --git a/server/utils.py b/server/utils.py
index 7de279f..033db5d 100644
--- a/server/utils.py
+++ b/server/utils.py
@@ -15,7 +15,7 @@
 import atexit, os, select, shutil, signal, StringIO, subprocess, tempfile
 import time, types, urllib, re, sys, textwrap
 import hosts, errors
-from error import *
+from common.error import *
 
 # A dictionary of pid and a list of tmpdirs for that pid
 __tmp_dirs = {}