From: Rob H. <for...@us...> - 2002-11-06 05:54:31
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv8664/bin Modified Files: sandweb-expect Log Message: improved error handling muchly, now fails _correctly_ if the password is false, instead of hanging indefinitely (!) Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.8 retrieving revision 1.9 diff -U2 -r1.8 -r1.9 --- sandweb-expect 11 Jul 2002 08:11:35 -0000 1.8 +++ sandweb-expect 6 Nov 2002 05:54:28 -0000 1.9 @@ -63,12 +63,20 @@ expect { "password:" { send "$vcs_password\r" } - "Are you sure" { send "yes\r" } - "Permission denied" { + } + + expect { + + "Are you sure" { + send "y" + } + + "denied" { send "Invalid VCS username/password\r" exit 2 } + eof { - send_user "Unexpected EOF\r\n" - exit 3 + # success + exit 0 } } |