Method
_read_base_url
(
log, # type: str
timeout, # type: float
)
Source from the content-addressed store, hash-verified
| 57 | |
| 58 | @staticmethod |
| 59 | def _read_base_url( |
| 60 | log, # type: str |
| 61 | timeout, # type: float |
| 62 | ): |
| 63 | # type: (...) -> Optional[str] |
| 64 | start = time.time() |
| 65 | while time.time() - start < timeout: |
| 66 | with open(log) as fp: |
| 67 | for line in fp: |
| 68 | match = re.search(r"Serving on (?P<url>http://\S+)$", line) |
| 69 | if match: |
| 70 | return match.group("url") |
| 71 | return None |
| 72 | |
| 73 | @staticmethod |
| 74 | def _get_process_creation_time(pid): |
Tested by
no test coverage detected