in sdk/python3/api.go [82:100]
func AgentShutdown(self *C.Agent, _ *C.PyObject) *C.PyObject {
agentsmu.Lock()
defer agentsmu.Unlock()
agent, exists := agents[self.agentnum]
if !exists {
setException("Agent already shutdown")
return nil
}
delete(agents, self.agentnum)
err := agent.Shutdown()
if err != nil {
setException(err.Error())
return nil
}
return C.none()
}