From ba03bec828693963ab45aef586dce011f2208802 Mon Sep 17 00:00:00 2001 From: James Laska Date: Tue, 5 Apr 2011 11:11:23 -0400 Subject: Actually use getpass --- update-blocker-wiki | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/update-blocker-wiki b/update-blocker-wiki index f1b0b2e..3480b9d 100755 --- a/update-blocker-wiki +++ b/update-blocker-wiki @@ -4,7 +4,7 @@ import os import sys import locale import optparse -import getpass +from getpass import getpass try: import bugzilla @@ -80,7 +80,11 @@ def parse_args(): # sanitize helper def sanitize_input(parser, value, label, ispass=False): if value is None and sys.stdin.isatty(): - value = raw_input('Enter %s: ' % label) + prompt = 'Enter %s: ' % label + if ispass: + value = getpass(prompt) + else: + value = raw_input(promt) if value is None: parser.error('Must provide a valid %s' % label) return value -- cgit