Add install function delaration

This commit is contained in:
Kloadut 2012-10-22 19:45:05 +02:00
parent 05c348570d
commit cb2b8dbf3c
2 changed files with 10 additions and 3 deletions

View file

@ -564,7 +564,13 @@ action_map = {
############################# #############################
'tools' : { 'tools' : {
'category_help' : _("Specific tools"), 'category_help' : _("Specific tools"),
'actions' : {} 'actions' : {
### tools_install()
'install' : {
'action_help' : _("Install YunoHost LDAP initialization"),
'connections' : ['ldap'],
},
}
}, },
} }
@ -642,7 +648,8 @@ def main(action_map):
else: else:
result = args.func(vars(args)) result = args.func(vars(args))
except TypeError, error: except TypeError, error:
print error if not __debug__ :
traceback.print_exc()
print(_("Not (yet) implemented function")) print(_("Not (yet) implemented function"))
return 1 return 1
except YunoHostError, error: except YunoHostError, error:

View file

@ -214,7 +214,7 @@ class YunoHostLDAP:
""" """
self.conn = ldap.initialize('ldap://localhost:389') self.conn = ldap.initialize('ldap://localhost:389')
self.base = 'dc=gavoty,dc=org' self.base = 'dc=yunohost,dc=org'
self.pwd = getpass.getpass(colorize(_('LDAP Admin Password: '), 'yellow')) self.pwd = getpass.getpass(colorize(_('LDAP Admin Password: '), 'yellow'))
try: try:
self.conn.simple_bind_s('cn=admin,' + self.base, self.pwd) self.conn.simple_bind_s('cn=admin,' + self.base, self.pwd)