MCPcopy Create free account
hub / github.com/ActiveState/code / __exit__

Method __exit__

recipes/Python/577524_Python_Sessions/recipe-577524.py:279–284  ·  view source on GitHub ↗

Activated at the end of the with statement. It automatically releases the lock if it isn't locked.

(self, type, value, traceback)

Source from the content-addressed store, hash-verified

277 return self
278
279 def __exit__(self, type, value, traceback):
280 """ Activated at the end of the with statement.
281 It automatically releases the lock if it isn't locked.
282 """
283 if self.is_locked:
284 self.release()
285
286 def __del__(self):
287 """ Make sure that the FileLock instance doesn't leave a lockfile

Callers

nothing calls this directly

Calls 1

releaseMethod · 0.95

Tested by

no test coverage detected