summaryrefslogtreecommitdiff
path: root/server/autoserv_parser.py
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-13 00:37:11 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-13 00:37:11 +0000
commit5861a30cabb0f17600e0c0e5de367b47009d0c45 (patch)
tree360ff7fded4a1b7528c178e62e695453c9f46b60 /server/autoserv_parser.py
parent277b8a13f54a72344bf4ae5f5426c66696ccc81e (diff)
Created a client/common_lib/utils/import_site_class function to take
care of site specific importing of classes. Modified code to use it. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2626 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'server/autoserv_parser.py')
-rw-r--r--server/autoserv_parser.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/server/autoserv_parser.py b/server/autoserv_parser.py
index 808dce49..0fadf0da 100644
--- a/server/autoserv_parser.py
+++ b/server/autoserv_parser.py
@@ -1,6 +1,6 @@
import os, sys, getopt, optparse
-from autotest_lib.client.common_lib import host_protections
+from autotest_lib.client.common_lib import host_protections, utils
class base_autoserv_parser(object):
@@ -101,14 +101,9 @@ class base_autoserv_parser(object):
(self.options, self.args) = self.parser.parse_args()
-
-try:
- from autotest_lib.server.site_autoserv_parser \
- import site_autoserv_parser
-except ImportError:
- class site_autoserv_parser(base_autoserv_parser):
- pass
-
+site_autoserv_parser = utils.import_site_class(
+ __file__, "autotest_lib.server.site_autoserv_parser",
+ "site_autoserv_parser", base_autoserv_parser)
class autoserv_parser(site_autoserv_parser):
pass