summaryrefslogtreecommitdiff
path: root/src/rabbit_control.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit_control.erl')
-rw-r--r--src/rabbit_control.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index ac7e3eaa..69e91803 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -338,7 +338,7 @@ format_info_item(Key, Items) ->
Value when is_binary(Value) ->
escape(Value);
Value when is_atom(Value) ->
- io_lib:format("~s", [Value]);
+ escape(atom_to_list(Value));
Value ->
io_lib:format("~w", [Value])
end.
@@ -365,7 +365,9 @@ rpc_call(Node, Mod, Fun, Args) ->
%% form part of UTF-8 strings.
escape(Bin) when binary(Bin) ->
- escape_char(lists:reverse(binary_to_list(Bin)), []).
+ escape(binary_to_list(Bin));
+escape(L) when is_list(L) ->
+ escape_char(lists:reverse(L), []).
escape_char([$\\ | T], Acc) ->
escape_char(T, [$\\, $\\ | Acc]);