MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / _ensure_executable

Function _ensure_executable

py/selenium-manager/selenium_manager/__init__.py:89–101  ·  view source on GitHub ↗
(binary: str)

Source from the content-addressed store, hash-verified

87
88
89def _ensure_executable(binary: str) -> None:
90 # Wheels do not carry the executable bit through every installer, so restore
91 # it here rather than in main(): library callers run the path themselves.
92 if os.name == "nt":
93 return
94 try:
95 mode = os.stat(binary).st_mode
96 if not mode & stat.S_IXUSR:
97 os.chmod(binary, mode | 0o755)
98 except OSError:
99 # A read-only site-packages can't be repaired from here; running the
100 # binary then fails with an error that names the path.
101 pass
102
103
104def main() -> None:

Callers 1

binary_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected