aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc/snmp_verbosity.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-11-06 14:47:21 +0100
committerMicael Karlberg <[email protected]>2013-11-06 14:47:21 +0100
commitb166476d2674c056ed5f737170074e71fbdc4bfd (patch)
tree5f4e19100537a437075d817998528dee206a7f26 /lib/snmp/src/misc/snmp_verbosity.erl
parent0b13c6cbfff58f928778428deb6862a7744416bb (diff)
parent57abd27ee8e189791c4d97ef86de6136c4924b52 (diff)
downloadotp-b166476d2674c056ed5f737170074e71fbdc4bfd.tar.gz
otp-b166476d2674c056ed5f737170074e71fbdc4bfd.tar.bz2
otp-b166476d2674c056ed5f737170074e71fbdc4bfd.zip
Merge branch 'bmk/snmp/handling_corrupt_atl_when_converting/OTP-11453' into bmk/snmp/handling_corrupt_atl_when_converting/r16/OTP-11453
Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src lib/snmp/vsn.mk
Diffstat (limited to 'lib/snmp/src/misc/snmp_verbosity.erl')
-rw-r--r--lib/snmp/src/misc/snmp_verbosity.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/snmp/src/misc/snmp_verbosity.erl b/lib/snmp/src/misc/snmp_verbosity.erl
index df5986b7bc..8c4fe3fcb0 100644
--- a/lib/snmp/src/misc/snmp_verbosity.erl
+++ b/lib/snmp/src/misc/snmp_verbosity.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -152,7 +152,17 @@ image_of_sname(mgr) -> "MGR";
image_of_sname(mgr_misc) -> "MGR_MISC";
image_of_sname(undefined) -> "";
-image_of_sname(V) -> lists:flatten(io_lib:format("~p",[V])).
+image_of_sname(S) when is_list(S) ->
+ %% The assumption is that its a printable string,
+ %% but just in case it is some other list...
+ try lists:flatten(io_lib:format("~s", [S])) of
+ L ->
+ L
+ catch
+ _:_ ->
+ lists:flatten(io_lib:format("~p", [S]))
+ end;
+image_of_sname(V) -> lists:flatten(io_lib:format("~p", [V])).
validate(info) -> info;