mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fuck.
This commit is contained in:
parent
a6c2e87be1
commit
277c081ac0
2 changed files with 10 additions and 9 deletions
17
yunohost.py
17
yunohost.py
|
@ -125,14 +125,15 @@ def get_required_args(args, required_args, password=False):
|
|||
else:
|
||||
raise Exception #FIX
|
||||
# Password
|
||||
if args['password'] is None and 'password' in required_args and password:
|
||||
if os.isatty(1):
|
||||
args['password'] = getpass.getpass(colorize(required_args['password'] + ': ', 'cyan'))
|
||||
pwd2 = getpass.getpass(colorize('Retype ' + required_args['password'][0].lower() + required_args['password'][1:] + ': ', 'cyan'))
|
||||
if args['password'] != pwd2:
|
||||
raise YunoHostError(22, _("Passwords doesn't match"))
|
||||
else:
|
||||
raise YunoHostError(22, _("Missing arguments"))
|
||||
if 'password' in required_args and password:
|
||||
if not args['password']:
|
||||
if os.isatty(1):
|
||||
args['password'] = getpass.getpass(colorize(required_args['password'] + ': ', 'cyan'))
|
||||
pwd2 = getpass.getpass(colorize('Retype ' + required_args['password'][0].lower() + required_args['password'][1:] + ': ', 'cyan'))
|
||||
if args['password'] != pwd2:
|
||||
raise YunoHostError(22, _("Passwords doesn't match"))
|
||||
else:
|
||||
raise YunoHostError(22, _("Missing arguments"))
|
||||
except KeyboardInterrupt, EOFError:
|
||||
raise YunoHostError(125, _("Interrupted, YunoHost not configured"))
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ def tools_postinstall(args, connections):
|
|||
raise YunoHostError(17, _("YunoHost is already installed"))
|
||||
|
||||
# Initialize YunoHost LDAP base
|
||||
tools_ldapinit(args, connections)
|
||||
#tools_ldapinit(args, connections)
|
||||
|
||||
# Change LDAP admin password
|
||||
tools_adminpw({ 'old' : 'yunohost', 'new' : args['password']})
|
||||
|
|
Loading…
Reference in a new issue