mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Print message inside prompting function in the cli
This commit is contained in:
parent
66ed5dfd8d
commit
790eaf0783
1 changed files with 3 additions and 9 deletions
|
@ -1,8 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# TODO: Switch to python3!
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import errno
|
import errno
|
||||||
import getpass
|
import getpass
|
||||||
|
@ -231,13 +228,10 @@ class Interface(BaseInterface):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if is_password:
|
if is_password:
|
||||||
def prompt(m):
|
prompt = lambda m: getpass.getpass(colorize(m18n.g('colon', m),
|
||||||
print(colorize(m18n.g('colon', m), 'blue'), end='')
|
'blue'))
|
||||||
return getpass.getpass()
|
|
||||||
else:
|
else:
|
||||||
def prompt(m):
|
prompt = lambda m: raw_input(colorize(m18n.g('colon', m), 'blue'))
|
||||||
print(colorize(m18n.g('colon', m), 'blue'), end='')
|
|
||||||
return raw_input()
|
|
||||||
value = prompt(message)
|
value = prompt(message)
|
||||||
|
|
||||||
if confirm:
|
if confirm:
|
||||||
|
|
Loading…
Add table
Reference in a new issue