[pve-devel] [PATCH common] CLIHandler: bugfix print_text_table

Stoiko Ivanov s.ivanov at proxmox.com
Wed Jun 20 13:28:36 CEST 2018


Default to printing '', if no default is provided for a column.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 src/PVE/CLIHandler.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
index c68aae8..206fda0 100644
--- a/src/PVE/CLIHandler.pm
+++ b/src/PVE/CLIHandler.pm
@@ -448,7 +448,7 @@ sub print_text_table {
 
 	push @keys, $key;
 	push @titles, $title;
-	$defaults{$key} = $default;
+	$defaults{$key} = $default // '';
 
 	# calculate maximal print width and cutoff
 	my $titlelen = length($title);
-- 
2.11.0





More information about the pve-devel mailing list