(self, path: str, reload: bool)
| 80 | """ |
| 81 | |
| 82 | def __init__(self, path: str, reload: bool) -> None: |
| 83 | self.name = "scriptmanager:" + path |
| 84 | self.path = path |
| 85 | self.fullpath = os.path.expanduser(path.strip("'\" ")) |
| 86 | self.ns: types.ModuleType | None = None |
| 87 | self.is_running = False |
| 88 | |
| 89 | if not os.path.isfile(self.fullpath): |
| 90 | raise exceptions.OptionsError(f"No such script: {self.fullpath}") |
| 91 | |
| 92 | self.reloadtask = None |
| 93 | if reload: |
| 94 | self.reloadtask = asyncio_utils.create_task( |
| 95 | self.watcher(), |
| 96 | name=f"script watcher for {path}", |
| 97 | keep_ref=False, |
| 98 | ) |
| 99 | else: |
| 100 | self.loadscript() |
| 101 | |
| 102 | def running(self): |
| 103 | self.is_running = True |
nothing calls this directly
no test coverage detected