From fe607363e2a67f9d565c1b618a3a4fd4bd0baa4e Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Fri, 16 Nov 2012 10:39:22 +0100 Subject: Fixed if it is not the record to read from in read_password --- lib/ssh/src/ssh_io.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/ssh/src') diff --git a/lib/ssh/src/ssh_io.erl b/lib/ssh/src/ssh_io.erl index fc7a572f7c..17a7cebb4a 100644 --- a/lib/ssh/src/ssh_io.erl +++ b/lib/ssh/src/ssh_io.erl @@ -56,7 +56,12 @@ yes_no(Prompt, Ssh) -> read_password(Prompt, Ssh) -> format("~s", [listify(Prompt)]), - proplists:get_value(user_pid, Ssh#ssh.opts) ! {self(), user_password}, + case is_list(Ssh) of + false -> + proplists:get_value(user_pid, Ssh#ssh.opts) ! {self(), user_password}; + _ -> + proplists:get_value(user_pid, Ssh) ! {self(), user_password} + end, receive Answer -> case Answer of -- cgit v1.2.3