[services] Typos diverses
This commit is contained in:
parent
5504700dee
commit
bd823060ce
1 changed files with 7 additions and 7 deletions
14
services.py
14
services.py
|
@ -48,7 +48,7 @@ def services_to_args_macip(x):
|
|||
if isinstance(x, attributs.ipHostNumber):
|
||||
return [str(x)]
|
||||
else:
|
||||
[ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]
|
||||
return [ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]
|
||||
elif isinstance(x.parent, objets.proprio):
|
||||
return [ str(ip) for m in x.parent.machines() for ip in m.get('ipHostNumber',[])]
|
||||
else:
|
||||
|
@ -56,9 +56,9 @@ def services_to_args_macip(x):
|
|||
|
||||
def services_to_args_port(x):
|
||||
if isinstance(x, attributs.ipHostNumber) or isinstance(x, attributs.ip6HostNumber):
|
||||
[str(x)]
|
||||
return [str(x)]
|
||||
else:
|
||||
[ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]
|
||||
return [ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]
|
||||
|
||||
# Trouver comment faire le cas où on ajoute une redirection mail (il faut alors retourner un quadruplet "homedir,uidNumber,uid,mail")
|
||||
def services_to_args_home(x):
|
||||
|
@ -68,7 +68,7 @@ def services_to_args_home(x):
|
|||
proprio=x
|
||||
else:
|
||||
return []
|
||||
if u'cransAccount' in [ str(o) for o in proprio.parent['objectClass']]:
|
||||
if u'cransAccount' in [ str(o) for o in proprio['objectClass']]:
|
||||
return [ "%s,%s,%s" % (proprio['homeDirectory'][0],proprio['uidNumber'][0],proprio['uid'][0]) ]
|
||||
else:
|
||||
return []
|
||||
|
@ -80,7 +80,7 @@ def services_to_args_del_user(x):
|
|||
proprio=x
|
||||
else:
|
||||
return []
|
||||
if u'cransAccount' in [ str(o) for o in proprio.parent['objectClass']]:
|
||||
if u'cransAccount' in [ str(o) for o in proprio['objectClass']]:
|
||||
return [ "%s,%s" % (proprio['uid'][0], proprio['homeDirectory'][0]) ]
|
||||
else:
|
||||
return []
|
||||
|
@ -101,7 +101,7 @@ def services_to_args_mail_bienvenue(x):
|
|||
adh=x
|
||||
else:
|
||||
return []
|
||||
if u'cransAccount' in [ str(o) for o in adh.parent['objectClass']]:
|
||||
if u'cransAccount' in [ str(o) for o in adh['objectClass']]:
|
||||
return [ "%s" % adh['canonicalAlias'][0] ]
|
||||
else:
|
||||
return [ "%s" % adh['mail'][0] ]
|
||||
|
@ -120,7 +120,7 @@ def services_to_time_mail_bienvenue(x):
|
|||
adh=x
|
||||
else:
|
||||
return []
|
||||
if u'cransAccount' in [ str(o) for o in adh.parent['objectClass']]:
|
||||
if u'cransAccount' in [ str(o) for o in adh['objectClass']]:
|
||||
return [ time.time() + 660 ]
|
||||
else:
|
||||
return [ 0 ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue