Modifications to support boobank under win32

Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
Laurent Dufréchou 2011-03-17 11:55:46 +01:00 committed by Romain Bignon
commit 86937aef95
3 changed files with 28 additions and 9 deletions

View file

@ -40,8 +40,13 @@ class ConsoleApplication(BaseApplication):
CAPS = None
# shell escape strings
BOLD = ''
NC = '' # no color
if sys.platform == 'win32':
#workaround to disable bold
BOLD = ''
NC = '' # no color
else:
BOLD = ''
NC = '' # no color
stdin = sys.stdin
stdout = sys.stdout
@ -356,7 +361,10 @@ class ConsoleApplication(BaseApplication):
while True:
if v.masked:
line = getpass.getpass(question)
if sys.platform == 'win32':
line = getpass.getpass(str(question))
else:
line = getpass.getpass(question)
else:
self.stdout.write(question)
self.stdout.flush()