summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-05-19 11:47:55 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-05-19 11:47:55 +0100
commit53c5b403ef621dad544b821db5ce08bc5d0d0bb9 (patch)
treedca88886df148710276b13153ceb7408ced6f2ba
parentc361a564aa78258f720c9e39aacb163a150ba6c3 (diff)
parent2ba5a0f30d9907d24411d805cdb378f544210fcf (diff)
downloadrabbitmq-server-53c5b403ef621dad544b821db5ce08bc5d0d0bb9.tar.gz
Merge bug26180
-rw-r--r--src/truncate.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/truncate.erl b/src/truncate.erl
index 02dba2e3..1d69de56 100644
--- a/src/truncate.erl
+++ b/src/truncate.erl
@@ -37,11 +37,12 @@ log_event({Type, GL, {Pid, ReportType, Report}}, Params)
log_event(Event, _Params) ->
Event.
-report([[Thing]], Params) -> report([Thing], Params);
-report(List, Params) -> [case Item of
- {K, V} -> {K, term(V, Params)};
- _ -> term(Item, Params)
- end || Item <- List].
+report([[Thing]], Params) -> report([Thing], Params);
+report(List, Params) when is_list(List) -> [case Item of
+ {K, V} -> {K, term(V, Params)};
+ _ -> term(Item, Params)
+ end || Item <- List];
+report(Other, Params) -> term(Other, Params).
term(Thing, {Content, Struct, ContentDec, StructDec}) ->
term(Thing, true, #params{content = Content,