diff options
author | Micael Karlberg <[email protected]> | 2012-03-05 16:36:43 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-03-05 16:36:43 +0100 |
commit | 66fada8e8d2b44535d12943b9fb3a149e5648d07 (patch) | |
tree | c14c1670b2f088a583ce919d4b8ee285f0e45720 /lib/snmp/src/agent | |
parent | d5bec369e7afa999d23c271c104101e47a35fb45 (diff) | |
parent | c4ef63a7d48b06123fb0b96f38f2a8b7df32fe49 (diff) | |
download | otp-66fada8e8d2b44535d12943b9fb3a149e5648d07.tar.gz otp-66fada8e8d2b44535d12943b9fb3a149e5648d07.tar.bz2 otp-66fada8e8d2b44535d12943b9fb3a149e5648d07.zip |
Merge branch 'bmk/snmp/improve_error_handling_reading_config/OTP-9943' into bmk/snmp/snmp422_integration/r15
Conflicts:
lib/snmp/test/snmp_app_test.erl
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r-- | lib/snmp/src/agent/snmp_standard_mib.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl index 7c78e03b3b..ca93546923 100644 --- a/lib/snmp/src/agent/snmp_standard_mib.erl +++ b/lib/snmp/src/agent/snmp_standard_mib.erl @@ -156,7 +156,7 @@ read_standard(Dir) -> Gen = fun(D, Reason) -> throw({error, {failed_reading_config_file, D, FileName, - file:list_dir(Dir), Reason}}) + list_dir(Dir), Reason}}) end, Filter = fun(Standard) -> sort_standard(Standard) end, Check = fun(Entry) -> check_standard(Entry) end, @@ -164,6 +164,14 @@ read_standard(Dir) -> snmp_conf:read_files(Dir, [{Gen, Filter, Check, FileName}]), Standard. +list_dir(Dir) -> + case file:list_dir(Dir) of + {ok, Files} -> + Files; + Error -> + Error + end. + %%----------------------------------------------------------------- %% Make sure that each mandatory standard attribute is present, and |