()
| 107 | |
| 108 | |
| 109 | def cleanup(): |
| 110 | Db.dbCloseAll() |
| 111 | for dir_path in [config.data_dir, config.data_dir + "-temp"]: |
| 112 | if os.path.isdir(dir_path): |
| 113 | for file_name in os.listdir(dir_path): |
| 114 | ext = file_name.rsplit(".", 1)[-1] |
| 115 | if ext not in ["csr", "pem", "srl", "db", "json", "tmp"]: |
| 116 | continue |
| 117 | file_path = dir_path + "/" + file_name |
| 118 | if os.path.isfile(file_path): |
| 119 | os.unlink(file_path) |
| 120 | |
| 121 | atexit.register(cleanup) |
| 122 |
nothing calls this directly
no test coverage detected