tempfiles: empty the list of known tempfiles after removing them

tempfiles would be cleaned up between tests, so the new "base directory"
would be removed as well, that made the next tentative to create a temporary
directory fail.

This is not interesting for regular execution of diffoscope, as only
programs executing diffoscope.main.main() twice within the same python
process would notice.

Closes: #902709
Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 1e8fb23d
Pipeline #11818 failed with stage
in 9 minutes and 58 seconds
......@@ -55,6 +55,7 @@ def clean_all_temp_files():
pass
except:
logger.exception("Unable to delete %s", x)
_FILES.clear()
logger.debug("Cleaning %d temporary directories", len(_DIRS))
......@@ -75,6 +76,7 @@ def clean_all_temp_files():
pass
except:
logger.exception("Unable to delete %s", x)
_DIRS.clear()
def _get_base_temporary_directory():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment