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 {
|
||||
$raw = $response->content;
|
||||
}
|
||||
|
||||
return if $raw eq '';
|
||||
|
||||
my $json = '';
|
||||
eval {
|
||||
$json = from_json($raw);
|
||||
};
|
||||
my $res = eval { from_json($raw) };
|
||||
die "api response is not a json" if $@;
|
||||
|
||||
return $json;
|
||||
return $res;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue