[Rt-commit] r10486 - rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools
ruz at bestpractical.com
ruz at bestpractical.com
Thu Jan 24 20:08:10 EST 2008
Author: ruz
Date: Thu Jan 24 20:08:05 2008
New Revision: 10486
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Lookup.html
Log:
* even if $query is not empty $iterator can be,
we must report error in both cases
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Lookup.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Lookup.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Lookup.html Thu Jan 24 20:08:05 2008
@@ -224,9 +224,8 @@
$port = 43 unless ($port || '') =~ /^\d+$/;
my $query = Net::Whois::RIPE->new( $whois, Port => $port, Debug => 1 );
my ($iterator, $error);
-if ( $query ) {
- $iterator = $query->query_iterator($q);
-} else {
+$iterator = $query->query_iterator($q) if $query;
+unless ( $iterator ) {
$error = loc( "Unable to connect to WHOIS server '[_1]'", $server);
}
More information about the Rt-commit
mailing list