Skip to content
Snippets Groups Projects
Commit dd8f1f1d authored by Dan Gebhardt's avatar Dan Gebhardt
Browse files

removed some unneeded warnings.

parent b06bd1af
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
# All rights reserved. # All rights reserved.
# #
#
# TODO:
# - Don't connect to DB every query. Leave connection open util
# another DB needs to be connected to (DG 1/3/07), unless the
# "connect" subroutine already does this...
#
package libwanetmondb; package libwanetmondb;
use strict; use strict;
...@@ -83,11 +90,12 @@ sub getRows($) ...@@ -83,11 +90,12 @@ sub getRows($)
if( $useOps ){ if( $useOps ){
# print "USING OPS\n";
TBDBConnect($OPSDBNAME, $DBUSER, $dbpwd) == 0 TBDBConnect($OPSDBNAME, $DBUSER, $dbpwd) == 0
or die("Could not connect to ops/pelab database!\n"); or die("Could not connect to ops/pelab database!\n");
my $query_result = DBQueryFatal($query); my $query_result = DBQueryFatal($query);
if (! $query_result->numrows) { if (! $query_result->numrows) {
warn("No results from OpsDB with query:\n$query\n"); # warn("No results from OpsDB with query:\n$query\n");
return @rows; return @rows;
} }
while( my $hrow = $query_result->fetchrow_hashref() ){ while( my $hrow = $query_result->fetchrow_hashref() ){
...@@ -98,7 +106,7 @@ sub getRows($) ...@@ -98,7 +106,7 @@ sub getRows($)
or die("Could not connect to nfs/pelab database!\n"); or die("Could not connect to nfs/pelab database!\n");
my $query_result = DBQueryFatal($query); my $query_result = DBQueryFatal($query);
if (! $query_result->numrows) { if (! $query_result->numrows) {
warn("No results from DataPository DB with query:\n$query\n"); # warn("No results from DataPository DB with query:\n$query\n");
return @rows; return @rows;
} }
while( my $hrow = $query_result->fetchrow_hashref() ){ while( my $hrow = $query_result->fetchrow_hashref() ){
...@@ -113,3 +121,5 @@ sub getRows($) ...@@ -113,3 +121,5 @@ sub getRows($)
1; # DON'T REMOVE THIS 1; # DON'T REMOVE THIS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment