Merge pull request #488 from ThinkChaos/fix/ovh-multiline-response
This commit is contained in:
commit
63a78a7f46
1 changed files with 3 additions and 3 deletions
|
@ -6946,8 +6946,8 @@ sub nic_ovh_update {
|
|||
}
|
||||
|
||||
my @reply = split /\n/, $reply;
|
||||
my $returned = pop(@reply);
|
||||
if ($returned =~ /good/ || $returned =~ /nochg/) {
|
||||
my $returned = List::Util::first { $_ =~ /good/ || $_ =~ /nochg/ } @reply;
|
||||
if ($returned) {
|
||||
$config{$h}{'ip'} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
|
@ -6958,7 +6958,7 @@ sub nic_ovh_update {
|
|||
}
|
||||
} else {
|
||||
$config{$h}{'status'} = 'failed';
|
||||
failed("updating %s: Server said: '%s'", $h, $returned);
|
||||
failed("updating %s: Server said: '%s'", $h, $reply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue