From 6fcdb180b5629e2f33c9e754176de7fd60f2c55b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 4 Feb 2017 22:28:44 +0000 Subject: [PATCH] bin/ovh-api --- bin/ovh-api | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ovh-api b/bin/ovh-api index 3056f0e5..85a992be 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -116,6 +116,8 @@ sub query { if ($Opt{rows}) { for my $id (@$content) { + $id =~ s,/.*$,,; + next if $URL eq '/ip' and $id !~ /\d+\./; $response = $Api->rawCall(path=>$URL.'/'.$id,method=>$Opt{method},body=>{}); die "$NAME: ERR: ".$response->error()."\n" if $response->isFailure(); print JSON::encode_json($response->content)."\n"; -- 2.47.3