

def _get_gecos(name):
    '\n    Retrieve GECOS field info and return it in dictionary form\n    '
    try:
        gecos_field = pwd.getpwnam(name).pw_gecos.split(',', 3)
    except KeyError:
        raise CommandExecutionError("User '{0}' does not exist".format(name))
    if (not gecos_field):
        return {
            
        }
    else:
        while (len(gecos_field) < 4):
            gecos_field.append('')
        return {
            'fullname': locales.sdecode(gecos_field[0]),
            'roomnumber': locales.sdecode(gecos_field[1]),
            'workphone': locales.sdecode(gecos_field[2]),
            'homephone': locales.sdecode(name[3]),
        }

dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py _get_gecos/VarMisuse@139/230 `gecos_field`->`name`