summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-05-04 10:25:08 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-05-04 10:25:08 +0100
commit0960e22cb63aa8499cf6a3aa3ae78e70547c2349 (patch)
treee11d5e0fbfe2bd83ac062c030558cb3403c1daeb
parent0c3c0032613885300b5fcdd0c465c23f71fe1ed6 (diff)
downloadrabbitmq-server-0960e22cb63aa8499cf6a3aa3ae78e70547c2349.tar.gz
cosmetic
-rw-r--r--src/rabbit_plugins.erl14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index 1d165f3f..00880fb2 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)) ||