From 43ef69a91097ac81e5777dd2e11bb3ba76e41162 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 14 Oct 2008 20:53:58 +0000 Subject: 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 --- lib/thandy/keys.py | 6 ++++-- 1 file 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: -- cgit v1.2.3