Author: turnstep
Date: Wed Apr 30 19:33:44 2008
New Revision: 11164
Modified:
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
Catch the correct error.
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Wed Apr 30 19:33:44 2008
@@ -194,7 +194,7 @@
};
last GETHANDLE if $@;
- if ($info !~ /[EMAIL PROTECTED]/) {
+ if (!defined $info or $info !~ /[EMAIL PROTECTED]/) {
$@ = 'Bad initdb output';
last GETHANDLE;
}
@@ -354,6 +354,8 @@
close $fh or die qq{Could not close "$helpfile": $!\n};
}
+ $@ and return $helpconnect, $@, undef;
+
GOTDBH:
## This allows things like data_sources() to work if we did an initdb
$ENV{DBI_DSN} = $testdsn;