Make all programs on kvm test use /usr/bin/python
All kvm modules that can be used as stand alone programs were
updated to use #!/usr/bin/python instead of #!/usr/bin/env python,
complying with the rest of the autotest code base. As suggested
by Martin, common.py was added. With this, the stand alone
programs will be able to use the autotest library namespace and
choose the best python interpreter available in the system.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3251 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 5d9b69e..6d27d04 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -1,4 +1,6 @@
+#!/usr/bin/python
import re, os, sys, StringIO
+import common
from autotest_lib.client.common_lib import error
"""
@@ -359,7 +361,7 @@
# (inside an exception or inside subvariants)
if restricted:
e_msg = "Using variants in this context is not allowed"
- raise error.AutotestError()
+ raise error.AutotestError(e_msg)
if self.debug and not restricted:
self.__debug_print(indented_line,
"Entering variants block (%d dicts in"