At some point, parallel_simple was broken. This updated patch fixes this
problem and a couple other potential problems. After this patch, there
should be no more silly uses of argv[0].
From: Jeremy Orlow <jorlow@google.com>
From: Steven Howard <showard@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@817 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/utils.py b/server/utils.py
index 10c7985..4f4b4ea 100644
--- a/server/utils.py
+++ b/server/utils.py
@@ -13,7 +13,7 @@
"""
import atexit, os, select, shutil, signal, StringIO, subprocess, tempfile
-import time, types, urllib, re
+import time, types, urllib, re, sys
import hosts, errors
@@ -345,3 +345,8 @@
install(*args, **dargs)
if os.path.exists(srcdir):
pickle.dump(new_version, open(versionfile, 'w'))
+
+
+def get_server_dir():
+ path = os.path.dirname(sys.modules['utils'].__file__)
+ return os.path.abspath(path)