Modifications to support boobank under win32
Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
parent
08d556a6e2
commit
86937aef95
3 changed files with 28 additions and 9 deletions
|
|
@ -40,8 +40,13 @@ class ConsoleApplication(BaseApplication):
|
|||
CAPS = None
|
||||
|
||||
# shell escape strings
|
||||
BOLD = '[1m'
|
||||
NC = '[0m' # no color
|
||||
if sys.platform == 'win32':
|
||||
#workaround to disable bold
|
||||
BOLD = ''
|
||||
NC = '' # no color
|
||||
else:
|
||||
BOLD = '[1m'
|
||||
NC = '[0m' # 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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue