

def chshell(name, shell):
    "\n    Change the default shell of the user\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' user.chshell foo /bin/zsh\n    "
    pre_info = info(name)
    if (not pre_info):
        raise CommandExecutionError("User '{0}' does not exist".format(name))
    if (shell == pre_info['shell']):
        return True
    _dscl(['/Users/{0}'.format(name), 'UserShell', pre_info['shell'], shell], ctype='change')
    time.sleep(1)
    return (info(pre_info).get('shell') == shell)

dataset/ETHPy150Open saltstack/salt/salt/modules/mac_user.py chshell/VarMisuse@93/197 `name`->`pre_info`