forked from Mirror/pve-network
sdn: code & indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d7d1181ed5
commit
9f4525c350
|
@ -288,16 +288,12 @@ sub api_request {
|
||||||
} else {
|
} else {
|
||||||
$raw = $response->content;
|
$raw = $response->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
return if $raw eq '';
|
return if $raw eq '';
|
||||||
|
|
||||||
my $json = '';
|
my $res = eval { from_json($raw) };
|
||||||
eval {
|
|
||||||
$json = from_json($raw);
|
|
||||||
};
|
|
||||||
die "api response is not a json" if $@;
|
die "api response is not a json" if $@;
|
||||||
|
|
||||||
return $json;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in a new issue