summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control.erl4
-rw-r--r--src/rabbit_misc.erl6
-rw-r--r--src/rabbit_multi.erl16
3 files changed, 13 insertions, 13 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index e05b1886..ed1d384d 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -326,8 +326,8 @@ display_row(Row) ->
io:nl().
format_info_item(Key, Items) ->
- Info = {Key, Value} = proplists:lookup(Key, Items),
- case Info of
+ Value = proplists:get_value(Key, Items),
+ case {Key, Value} of
{_, #resource{name = Name}} ->
escape(Name);
_ when Key =:= address; Key =:= peer_address andalso is_tuple(Value) ->
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index 814e3c31..95a274e3 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -189,9 +189,9 @@ r(VHostPath, Kind) when is_binary(VHostPath) ->
r_arg(#resource{virtual_host = VHostPath}, Kind, Table, Key) ->
r_arg(VHostPath, Kind, Table, Key);
r_arg(VHostPath, Kind, Table, Key) ->
- case proplists:lookup(Key, Table) of
- {_, longstr, NameBin} -> r(VHostPath, Kind, NameBin);
- none -> undefined
+ case lists:keysearch(Key, 1, Table) of
+ {value, {_, longstr, NameBin}} -> r(VHostPath, Kind, NameBin);
+ false -> undefined
end.
rs(#resource{virtual_host = VHostPath, kind = Kind, name = Name}) ->
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl
index 6fc7bd67..35b1def3 100644
--- a/src/rabbit_multi.erl
+++ b/src/rabbit_multi.erl
@@ -217,19 +217,19 @@ is_rabbit_running(Node, RpcTimeout) ->
{badrpc, _} ->
false;
Status ->
- case proplists:lookup(running_applications, Status) of
- {running_applications, Apps} ->
- proplists:is_defined(rabbit, Apps);
- none ->
- false
+ case proplists:get_value(running_applications, Status) of
+ undefined ->
+ false;
+ Apps ->
+ lists:keymember(rabbit, 1, Apps)
end
end.
with_os(Handlers) ->
{OsFamily, _} = os:type(),
- case proplists:lookup(OsFamily, Handlers) of
- {_, Handler} -> Handler();
- none -> throw({unsupported_os, OsFamily})
+ case proplists:get_value(OsFamily, Handlers) of
+ Handler -> Handler();
+ undefined -> throw({unsupported_os, OsFamily})
end.
script_filename() ->