Allow Packer to be used as context manager + test for rewriting img seqs

This commit is contained in:
Sybren A. Stüvel
2018-03-14 12:50:27 +01:00
parent d2ac0fa919
commit 0e9de7753c
4 changed files with 27 additions and 1 deletions
+6
View File
@@ -83,6 +83,12 @@ class Packer:
"""Clean up any temporary files."""
self._tmpdir.cleanup()
def __enter__(self) -> 'Packer':
return self
def __exit__(self, exc_type, exc_val, exc_tb) -> None:
self.close()
def strategise(self) -> None:
"""Determine what to do with the assets.