]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Format.pm
format: fix render_bytes with CLIFormatter
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 17 Feb 2021 13:32:16 +0000 (14:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 25 Feb 2021 20:20:59 +0000 (21:20 +0100)
commit3bb8802a08b2bd57f82f00d7224ec6890986390b
treee21602fb0e0514b027f66633149ce38bea096633
parentef737f0b3c0a79fb236539da0307929598d1340a
format: fix render_bytes with CLIFormatter

CLIFormatter passes in an options hash as a second paramter, which so
far was ignored. Now that we treat it as a precision parameter, check if
it is a hash and extract the option from it before using it.

Otherwise perl puts HASH(0x...) into the format and sprintf chokes.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/PVE/Format.pm