MCPcopy Create free account
hub / github.com/pex-tool/pex / _read_base_url

Method _read_base_url

testing/devpi.py:59–71  ·  view source on GitHub ↗
(
        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):

Callers 1

recordMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected