MCPcopy Create free account
hub / github.com/certbot/certbot / __init__

Method __init__

certbot/src/certbot/_internal/lock.py:36–45  ·  view source on GitHub ↗

Create a LockFile instance on the given file path, and acquire lock. :param str path: the path to the file that will hold a lock

(self, path: str)

Source from the content-addressed store, hash-verified

34 depending on Linux or Windows.
35 """
36 def __init__(self, path: str) -> None:
37 """
38 Create a LockFile instance on the given file path, and acquire lock.
39 :param str path: the path to the file that will hold a lock
40 """
41 self._path = path
42 mechanism = _UnixLockMechanism if POSIX_MODE else _WindowsLockMechanism
43 self._lock_mechanism = mechanism(path)
44
45 self.acquire()
46
47 def __repr__(self) -> str:
48 repr_str = '{0}({1}) <'.format(self.__class__.__name__, self._path)

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.95

Tested by

no test coverage detected