

def _update_gecos(name, key, value):
    "\n    Common code to change a user's GECOS information\n    "
    if (not isinstance(value, six.string_types)):
        value = str(value)
    pre_info = _get_gecos(name)
    if (not pre_info):
        return False
    if (value == pre_info[key]):
        return True
    gecos_data = copy.deepcopy(pre_info)
    gecos_data[key] = value
    cmd = ['pw', 'usermod', name, '-c', _build_gecos(gecos_data)]
    __salt__['cmd.run'](cmd, python_shell=False)
    post_info = info(pre_info)
    return (_get_gecos(name).get(key) == value)

dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py _update_gecos/VarMisuse@123/194 `name`->`pre_info`