[med-svn] r8559 - trunk/packages/gmod/chado/trunk/debian

olivier sallou osallou-guest at alioth.debian.org
Mon Nov 14 10:12:17 UTC 2011


Author: osallou-guest
Date: 2011-11-14 10:12:16 +0000 (Mon, 14 Nov 2011)
New Revision: 8559

Modified:
   trunk/packages/gmod/chado/trunk/debian/testdb.pl
Log:
catch DBI die in case of DB failure at installation

Modified: trunk/packages/gmod/chado/trunk/debian/testdb.pl
===================================================================
--- trunk/packages/gmod/chado/trunk/debian/testdb.pl	2011-11-14 10:09:42 UTC (rev 8558)
+++ trunk/packages/gmod/chado/trunk/debian/testdb.pl	2011-11-14 10:12:16 UTC (rev 8559)
@@ -15,7 +15,10 @@
 
 my $db_conf = Bio::GMOD::DB::Config->new($gmod_conf,'gmod-chado');
 
-my $dbh = $db_conf->dbh or exit 102;
+my $dbh = eval {$db_conf->dbh};
+if( $@ =~ m/couldn't create db connection/i ) {
+ exit 102;
+}
 
 my $nbtables = $dbh->prepare("select count(*) as nbtables from pg_tables");
 $nbtables->execute() or exit 102;




More information about the debian-med-commit mailing list