(
pth_path, # type: str
sitedir, # type: str
)
| 24 | cleanups = [] |
| 25 | |
| 26 | def write_pth( |
| 27 | pth_path, # type: str |
| 28 | sitedir, # type: str |
| 29 | ): |
| 30 | # type: (...) -> None |
| 31 | cleanups.append(lambda: safe_delete(pth_path)) |
| 32 | with open(pth_path, "w") as fp: |
| 33 | fp.write("import site; site.addsitedir({!r})\n".format(sitedir)) |
| 34 | |
| 35 | try: |
| 36 | yield write_pth |
nothing calls this directly
no test coverage detected