summaryrefslogtreecommitdiff
path: root/tko/retrieve_logs.cgi
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-13 00:57:14 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-13 00:57:14 +0000
commit59354004d4186c54379ec20b7e31177337c77c8c (patch)
tree0c92e933fe74746277143a353617f161db3aa52e /tko/retrieve_logs.cgi
parenta939fbcd822b8c1cdd8d841a68bf16665c68de86 (diff)
Added a function to import site specific functions. Modified code to use it.
Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2628 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/retrieve_logs.cgi')
-rwxr-xr-xtko/retrieve_logs.cgi17
1 files changed, 10 insertions, 7 deletions
diff --git a/tko/retrieve_logs.cgi b/tko/retrieve_logs.cgi
index 0f822a40..f7c2fd6b 100755
--- a/tko/retrieve_logs.cgi
+++ b/tko/retrieve_logs.cgi
@@ -3,6 +3,7 @@
import cgi, os, sys, urllib2
import common
from autotest_lib.client.common_lib import global_config
+from autotest_lib.client.bin import utils
page = """\
Status: 302 Found
@@ -16,14 +17,16 @@ sys.path.insert(0, tko)
autodir = os.path.abspath(os.path.join(tko, '..'))
+
+def _retrieve_logs_dummy(job_path):
+ pass
+
+
# Define function for retrieving logs
-try:
- import site_retrieve_logs
- retrieve_logs = site_retrieve_logs.retrieve_logs
- del site_retrieve_logs
-except ImportError:
- def retrieve_logs(job_path):
- pass
+retrieve_logs = import_site_function(__file__,
+ "autotest_lib.tko.site_retrieve_logs", "retrieve_logs",
+ _retrieve_logs_dummy)
+
# Get form fields
form = cgi.FieldStorage(keep_blank_values=True)