(modify_times: Dict[str, float], path: str)
| 189 | |
| 190 | |
| 191 | def _check_file(modify_times: Dict[str, float], path: str) -> None: |
| 192 | try: |
| 193 | modified = os.stat(path).st_mtime |
| 194 | except Exception: |
| 195 | return |
| 196 | if path not in modify_times: |
| 197 | modify_times[path] = modified |
| 198 | return |
| 199 | if modify_times[path] != modified: |
| 200 | gen_log.info("%s modified; restarting server", path) |
| 201 | _reload() |
| 202 | |
| 203 | |
| 204 | def _reload() -> None: |
no test coverage detected