Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, path, sleep_func=time.sleep, logger=None):
self.lockfile = None
self.path = _utils.canonicalize_path(path)
self.acquired = False
self.sleep_func = sleep_func
self.logger = _utils.pick_first_not_none(logger, LOG)