Index: client/tests/kvm/tests/whql_client_install.py |
diff --git a/client/tests/kvm/tests/whql_client_install.py b/client/tests/kvm/tests/whql_client_install.py |
index d866df7ed88ea68adb1a6bda3e8a1d64ad9a3dd8..84b91bc282431188590d8a08df0dfb09bd682e19 100644 |
--- a/client/tests/kvm/tests/whql_client_install.py |
+++ b/client/tests/kvm/tests/whql_client_install.py |
@@ -60,7 +60,11 @@ def run_whql_client_install(test, params, env): |
server_workgroup = server_workgroup.splitlines()[-1] |
regkey = r"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" |
cmd = "reg query %s /v Domain" % regkey |
- server_dns_suffix = server_session.get_command_output(cmd).split()[-1] |
+ o = server_session.get_command_output(cmd).strip().splitlines()[-1] |
+ try: |
+ server_dns_suffix = o.split(None, 2)[2] |
+ except IndexError: |
+ server_dns_suffix = "" |
# Delete the client machine from the server's data store (if it's there) |
server_session.get_command_output("cd %s" % server_studio_path) |
@@ -86,7 +90,7 @@ def run_whql_client_install(test, params, env): |
# Set the client machine's DNS suffix |
logging.info("Setting DNS suffix to '%s'" % server_dns_suffix) |
- cmd = "reg add %s /v Domain /d %s /f" % (regkey, server_dns_suffix) |
+ cmd = 'reg add %s /v Domain /d "%s" /f' % (regkey, server_dns_suffix) |
if session.get_command_status(cmd, timeout=300) != 0: |
raise error.TestError("Could not set the client's DNS suffix") |