(project_name)
| 37 | |
| 38 | |
| 39 | def prepare_project(project_name): |
| 40 | dst = "{}{}/".format(PATH_WEB_PROJECT, project_name) |
| 41 | |
| 42 | logger.info("-[ Prepare and cleanup project: {}".format(project_name)) |
| 43 | |
| 44 | if not os.path.exists(dst): |
| 45 | os.makedirs(dst) |
| 46 | |
| 47 | # delete all files in dst directory |
| 48 | for file in os.listdir(dst): |
| 49 | if file == "project.pickle": |
| 50 | continue |
| 51 | if file.startswith("."): |
| 52 | continue |
| 53 | if file.endswith(".exe"): |
| 54 | # keep all exes except: |
| 55 | if file != "main.exe" and not file.endswith(".infected.exe"): |
| 56 | continue |
| 57 | if file.endswith(".dll"): |
| 58 | # keep all dlls except: |
| 59 | if not file.endswith(".infected.dll"): |
| 60 | continue |
| 61 | |
| 62 | os.remove(dst + file) |
no test coverage detected