diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-05-16 17:54:02 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-05-16 17:54:02 +0100 |
| commit | a545f4a13b6f19adcf1f075c482003660561e98d (patch) | |
| tree | 0273bfa9fa1bb7efc0e23f191cbf7a6899bd3594 /src | |
| parent | 822f520ae60b6efff7144e8b5f6c03949bbf34ce (diff) | |
| parent | 37fe19d9e0b0d073c074beac63faa9f961bb5c45 (diff) | |
| download | rabbitmq-server-git-a545f4a13b6f19adcf1f075c482003660561e98d.tar.gz | |
stable to default
Diffstat (limited to 'src')
| -rw-r--r-- | src/truncate.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/truncate.erl b/src/truncate.erl index 02dba2e36a..1d69de56ac 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, |
