diff options
Diffstat (limited to 'wintest/wintest.py')
-rw-r--r-- | wintest/wintest.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py index effc77e95e..67af51a313 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -453,11 +453,13 @@ class wintest(): if len(s) > 0: s[1] = s[1].upper() username = '@'.join(s) - child = self.pexpect_spawn('kinit -V ' + username) - child.expect("Password for") + child = self.pexpect_spawn('kinit ' + username) + child.expect("Password") child.sendline(password) - child.expect("Authenticated to Kerberos") - + child.expect(pexpect.EOF) + child.close() + if child.exitstatus != 0: + raise RuntimeError("kinit failed with status %d" % child.exitstatus) def get_domains(self): '''return a dictionary of DNS domains and IPs for named.conf''' |