projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9194ee0
)
fix #1914: CLIFormatter: check also for existence of 'type'
author
Dominik Csapak
<d.csapak@proxmox.com>
Mon, 17 Sep 2018 08:32:03 +0000
(10:32 +0200)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Mon, 17 Sep 2018 08:58:35 +0000
(10:58 +0200)
we sometimes define
result => {}
on an api call, so check that result->{type} is defined
and guess the type if not
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/CLIFormatter.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/CLIFormatter.pm
b/src/PVE/CLIFormatter.pm
index 47021800956a806904aec6d885aadb2804bc8fa1..3040323eff0f480fe096fbdf1be2c196e80181b3 100644
(file)
--- a/
src/PVE/CLIFormatter.pm
+++ b/
src/PVE/CLIFormatter.pm
@@
-409,7
+409,7
@@
sub print_api_result {
my $format = $options->{'output-format'} // 'text';
- if ($result_schema) {
+ if ($result_schema
&& defined($result_schema->{type})
) {
return if $result_schema->{type} eq 'null';
} else {
my $type = $guess_type->($data);