Fix the warning about no slaves/nodes.

This commit is contained in:
Daniel Nichter
2013-10-02 11:39:26 -07:00
parent 8767640b1c
commit 5ebba34c5b

View File

@@ -9219,11 +9219,12 @@ sub main {
# https://bugs.launchpad.net/percona-toolkit/+bug/1210537 # https://bugs.launchpad.net/percona-toolkit/+bug/1210537
PTDEBUG && _d(scalar @$slaves, 'slaves found'); PTDEBUG && _d(scalar @$slaves, 'slaves found');
if ( !@$slaves if ( !@$slaves
&& $o->get('recursion-method')->[0] && (($o->get('recursion-method')->[0] || '') ne 'none'
&& $o->get('recursion-method')->[0] ne 'none' ) { || $autodiscover_cluster))
{
$exit_status |= 1; $exit_status |= 1;
if ( $o->get('quiet') < 2 ) { if ( $o->get('quiet') < 2 ) {
my $type = $autodiscover_cluster ? 'nodes' : 'slaves'; my $type = $autodiscover_cluster ? 'cluster nodes' : 'slaves';
warn "Diffs cannot be detected because no $type were found. " warn "Diffs cannot be detected because no $type were found. "
. "Please read the --recursion-method documentation for " . "Please read the --recursion-method documentation for "
. "information.\n"; . "information.\n";