diff options
author | Roger Dingledine <arma@torproject.org> | 2008-10-14 20:53:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-10-14 20:53:58 +0000 |
commit | 43ef69a91097ac81e5777dd2e11bb3ba76e41162 (patch) | |
tree | 6a337a90900d98f0904a48c8f61d327154639a01 /lib | |
parent | 69842c35f818591fcce8b3e736aa4b3e49fa3f84 (diff) |
tolerate the 2.4 getpass(), which can't be told which stream
to write on.
git-svn-id: file:///home/or/svnrepo/updater/trunk@17102 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Diffstat (limited to 'lib')
-rw-r--r-- | lib/thandy/keys.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/thandy/keys.py b/lib/thandy/keys.py index 34b0e46..f4bcac9 100644 --- a/lib/thandy/keys.py +++ b/lib/thandy/keys.py @@ -354,11 +354,13 @@ class KeyStore(thandy.formats.KeyDB): if self._passwd != None: return self._passwd while 1: - pwd = getpass.getpass("Password: ", sys.stderr) + sys.stderr.write("Password: ") + pwd = getpass.getpass("") if not reprompt: return pwd - pwd2 = getpass.getpass("Confirm: ", sys.stderr) + sys.stderr.write("Confirm: ") + pwd2 = getpass.getpass("") if pwd == pwd2: return pwd else: |