mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
fix a file descriptor leak in the temporary file code
Summary: The new temporary file code added in D20885160 was missing a call to close the underlying file in the `__exit__()` function. Reviewed By: xavierd Differential Revision: D21271901 fbshipit-source-id: 653258d471421edd08b473654ae3d0503f3c6829
This commit is contained in:
parent
4eeab3b81b
commit
606e928233
@ -192,7 +192,7 @@ class TemporaryFileBase(Generic[IOType]):
|
||||
exc_value: Optional[BaseException],
|
||||
tb: Optional[types.TracebackType],
|
||||
) -> None:
|
||||
pass
|
||||
self.file.close()
|
||||
|
||||
|
||||
class TemporaryTextFile(TemporaryFileBase[TextIO]):
|
||||
|
Loading…
Reference in New Issue
Block a user