-def get_pwdgrp(unam, gnam): #{{{
- def do(type, funcnam, funcid, name):
- try:
- id = funcnam(name)[2]
- except:
- try:
- id = int(name)
- name = funcid(id)[0]
- except Exception, e:
- log.critical(_(u'No existe el %s %s (%s)'), type, name, e)
- sys.exit(1)
- return (id, name)
- return do('usuario', pwd.getpwnam, pwd.getpwuid, unam) \
- + do('grupo', grp.getgrnam, grp.getgrgid, gnam)
-#}}}
-