Clean up that needs to be done at the end of a game
(dockers, args, sock_file)
| 153 | |
| 154 | |
| 155 | def cleanup(dockers, args, sock_file): |
| 156 | ''' |
| 157 | Clean up that needs to be done at the end of a game |
| 158 | ''' |
| 159 | for player_key in dockers: |
| 160 | docker_inst = dockers[player_key] |
| 161 | docker_inst.destroy() |
| 162 | |
| 163 | if isinstance(sock_file, str) or isinstance(sock_file, bytes): |
| 164 | # only unlink unix sockets |
| 165 | os.unlink(sock_file) |
| 166 | |
| 167 | |
| 168 | def get_map(map_name): |