mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
master: delete head repository checkout on exit
This commit is contained in:
parent
42010fcd4b
commit
c80f0fa07a
@ -74,6 +74,7 @@ def main():
|
||||
else:
|
||||
repo_backend = FilesystemBackend(args.repository)
|
||||
repository = Repository(repo_backend, log.log)
|
||||
atexit.register(repository.close)
|
||||
repository.scan_async()
|
||||
|
||||
worker_handlers = {
|
||||
|
@ -63,6 +63,10 @@ class Repository:
|
||||
|
||||
self._scanning = False
|
||||
|
||||
def close(self):
|
||||
# The object cannot be used anymore after calling this method.
|
||||
self.backend.release_rev(self.head_rev)
|
||||
|
||||
@asyncio.coroutine
|
||||
def scan(self):
|
||||
if self._scanning:
|
||||
|
Loading…
Reference in New Issue
Block a user