Fix `rabbitmqctl status` when the disk_free cannot be determined
By adjusting RabbitMQ.CLI.InformationUnit to no longer attempt to convert non-numeric values
This commit is contained in:
parent
b7b73302f9
commit
9dc9b92a94
|
@ -30,14 +30,18 @@ defmodule RabbitMQ.CLI.InformationUnit do
|
|||
:rabbit_resource_monitor_misc.parse_information_unit(val)
|
||||
end
|
||||
|
||||
def convert(bytes, "bytes") do
|
||||
def convert(bytes, "bytes") when is_number(bytes) do
|
||||
bytes
|
||||
end
|
||||
|
||||
def convert(bytes, unit) do
|
||||
def convert(bytes, unit) when is_number(bytes) do
|
||||
do_convert(bytes, String.downcase(unit))
|
||||
end
|
||||
|
||||
def convert(:unknown, _) do
|
||||
:unknown
|
||||
end
|
||||
|
||||
def known_unit?(val) do
|
||||
MapSet.member?(known_units(), String.downcase(val))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue