gnulib-tool.py: Don't leave temporary directories on exit.
commit3169fd03dc5c917dbfe3096ec54921ca0e5f7253
authorCollin Funk <collin.funk1@gmail.com>
Thu, 2 May 2024 07:49:58 +0000 (2 00:49 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 2 May 2024 07:49:58 +0000 (2 00:49 -0700)
tree86942f18503f9e50f500b1eed551d31bf88b2a5e
parentadc6d632afe4a7e055bf4cd0f4723fc922fa5d6c
gnulib-tool.py: Don't leave temporary directories on exit.

* pygnulib/main.py (main_with_exception_handling): Use
tempfile.TemporaryDirectory as a context manager so it is removed before
the program exits.
(main): Expect a temporary directory to be passed as an argument.
* pygnulib/GLConfig.py (GLConfig.__init__): Accept an optional temporary
directory parameter instead of creating one.
* pygnulib/GLImport.py (GLImport.__init__): Don't remove the cache's
temporary directory since it doesn't create one anymore.
(GLImport.execute): Don't remove the temporary directory explicitly. It
is handled by the usage of a context manager.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.
ChangeLog
pygnulib/GLConfig.py
pygnulib/GLImport.py
pygnulib/GLTestDir.py
pygnulib/main.py