diff options
author | Badlop <badlop@process-one.net> | 2014-03-05 12:12:47 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2015-03-26 14:00:06 +0100 |
commit | 57035b383c0bf77fc45b9ae36b374e4ee30dcad9 (patch) | |
tree | a26e8678c04d9333b03f769e674ce4339188bf20 | |
parent | Fixes srg_* commands (fixes #147) (diff) |
Handle error when requesting information of a non-existing shared roster (fixes #14)
-rw-r--r-- | src/mod_admin_extra.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index 41f05e5aa..c5060f088 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -1332,7 +1332,10 @@ srg_list(Host) -> lists:sort(mod_shared_roster:list_groups(Host)). srg_get_info(Group, Host) -> - Opts = mod_shared_roster:get_group_opts(Host,Group), + Opts = case mod_shared_roster:get_group_opts(Host,Group) of + Os when is_list(Os) -> Os; + error -> [] + end, [{io_lib:format("~p", [Title]), io_lib:format("~p", [Value])} || {Title, Value} <- Opts]. |