mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-25 23:52:23 +02:00
Merge pull request #751 from digitalisx/fix/context-manager
Fix: file close context manager (`__del__` to `__exit__`) for physical layers.
This commit is contained in:
@@ -191,7 +191,7 @@ class FileLayer(interfaces.layers.DataLayerInterface):
|
||||
"""Closes the file handle."""
|
||||
self._file.close()
|
||||
|
||||
def __del__(self) -> None:
|
||||
def __exit__(self) -> None:
|
||||
self.destroy()
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user