close file when out of scope

This commit is contained in:
Kenta420-Poom 2023-09-21 09:06:54 +07:00
parent d64c60a7fd
commit 6b39392dfb

View file

@ -174,6 +174,7 @@ func (s *Server) createHandler() {
if api_err != nil {
log.Fatalln("Merge request failed. Python api error: ", api_err)
}
defer merge_api.Close()
log.Println("Locate python api", merge_api.Name())
cmd := exec.Command(py_exec, merge_api.Name(), "merge", master_path, dev_path, output_path, changelog_path, "debug")