Unverified Commit a6b4effc authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

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
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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():