aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_io.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-16 10:39:22 +0100
committerFredrik Gustafsson <[email protected]>2012-11-16 10:39:22 +0100
commitfe607363e2a67f9d565c1b618a3a4fd4bd0baa4e (patch)
treee4c1372b7b8f4a401f0bef80c10bcb1c1d9646f5 /lib/ssh/src/ssh_io.erl
parente9d46adb58b940a92874b2c4bcc833dfcf7375a3 (diff)
downloadotp-fe607363e2a67f9d565c1b618a3a4fd4bd0baa4e.tar.gz
otp-fe607363e2a67f9d565c1b618a3a4fd4bd0baa4e.tar.bz2
otp-fe607363e2a67f9d565c1b618a3a4fd4bd0baa4e.zip
Fixed if it is not the record to read from in read_password
Diffstat (limited to 'lib/ssh/src/ssh_io.erl')
-rw-r--r--lib/ssh/src/ssh_io.erl7
1 files changed, 6 insertions, 1 deletions
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