diff options
author | Micael Karlberg <[email protected]> | 2013-11-13 17:20:31 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-11-13 17:20:31 +0100 |
commit | 8bcd32dfceec3b4381747046b82eec42487c7518 (patch) | |
tree | cca7f396b6b3bd98950e5fc7713dfc9988633b10 /lib/snmp/src/misc/snmp_verbosity.erl | |
parent | dc6f086a0751677da8724df397a062ab154f34cb (diff) | |
parent | b166476d2674c056ed5f737170074e71fbdc4bfd (diff) | |
download | otp-8bcd32dfceec3b4381747046b82eec42487c7518.tar.gz otp-8bcd32dfceec3b4381747046b82eec42487c7518.tar.bz2 otp-8bcd32dfceec3b4381747046b82eec42487c7518.zip |
Merge branch 'bmk/snmp/handling_corrupt_atl_when_converting/r16/OTP-11453' into bmk/snmp/snmp425_integration
Conflicts:
lib/snmp/src/misc/snmp_log.erl
Diffstat (limited to 'lib/snmp/src/misc/snmp_verbosity.erl')
-rw-r--r-- | lib/snmp/src/misc/snmp_verbosity.erl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/snmp/src/misc/snmp_verbosity.erl b/lib/snmp/src/misc/snmp_verbosity.erl index e5ff3daf91..7d063fd702 100644 --- a/lib/snmp/src/misc/snmp_verbosity.erl +++ b/lib/snmp/src/misc/snmp_verbosity.erl @@ -154,7 +154,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; |