From 702508745682c29cb3f9959b7c22d535b767459f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Nov 2010 17:19:55 +1100 Subject: wintest: cope with the heimdal version of kinit Autobuild-User: Andrew Tridgell Autobuild-Date: Mon Nov 29 08:49:36 CET 2010 on sn-devel-104 --- wintest/wintest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'wintest/wintest.py') diff --git a/wintest/wintest.py b/wintest/wintest.py index effc77e95ef..67af51a313b 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''' -- cgit