]> git.proxmox.com Git - pve-common.git/commit
print_text_table: handle undefined values in comparision
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 28 Apr 2020 08:18:26 +0000 (10:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 May 2020 16:20:39 +0000 (18:20 +0200)
commit890d25d96385ea2e0059e8e2f2067281f764f19f
tree24e2d384ee4a9235d4d914be0e59a2473896cc67
parent87e31b23589e2747b819d7ac5f1fc45f6754b9c1
print_text_table: handle undefined values in comparision

by introducing a safe_compare helper. Fixes warnings, e.g.
pvesh get /nodes/<NODE>/network
would print "use of uninitialized"-warnings if there are inactive
network interfaces, because for those, 'active' is undef.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
src/PVE/CLIFormatter.pm
src/PVE/Tools.pm