diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2012-05-04 10:25:08 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-05-04 10:25:08 +0100 |
| commit | 7a19a9572821f58b3ee2b4ceff317fd53ed50f08 (patch) | |
| tree | e11d5e0fbfe2bd83ac062c030558cb3403c1daeb /src | |
| parent | a7e9320c089bc6c517cec737cec0c6137f21ee2e (diff) | |
| download | rabbitmq-server-git-7a19a9572821f58b3ee2b4ceff317fd53ed50f08.tar.gz | |
cosmetic
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_plugins.erl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 1d165f3fa7..00880fb2e2 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -245,7 +245,7 @@ format_plugins(Pattern, Opts, PluginsFile, PluginsDir) -> {true, true} -> throw({error_string, "Cannot specify -m and -v together"}) end, - OnlyEnabled = proplists:get_bool(?ENABLED_OPT, Opts), + OnlyEnabled = proplists:get_bool(?ENABLED_OPT, Opts), OnlyEnabledAll = proplists:get_bool(?ENABLED_ALL_OPT, Opts), AvailablePlugins = find_plugins(PluginsDir), @@ -257,14 +257,10 @@ format_plugins(Pattern, Opts, PluginsFile, PluginsDir) -> Plugins = [ Plugin || Plugin = #plugin{name = Name} <- AvailablePlugins, re:run(atom_to_list(Name), RE, [{capture, none}]) =:= match, - if OnlyEnabled -> lists:member(Name, EnabledExplicitly); - true -> true - end, - if OnlyEnabledAll -> - lists:member(Name, EnabledImplicitly) or - lists:member(Name, EnabledExplicitly); - true -> - true + if OnlyEnabled -> lists:member(Name, EnabledExplicitly); + OnlyEnabledAll -> (lists:member(Name, EnabledExplicitly) or + lists:member(Name, EnabledImplicitly)); + true -> true end], Plugins1 = usort_plugins(Plugins), MaxWidth = lists:max([length(atom_to_list(Name)) || |
