releasetools: Move one case of mkdtemp() to common.MakeTempDir().
This should be the last case to be moved over.
Test: Generate an incremental BBOTA (which exercises the changed code).
Test: `rgrep mkdtemp` gives no more instance.
Change-Id: I76db069476201cdfaf3a2de9d9635dfe54507f7a
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index c4fb29b..bb80556 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1535,9 +1535,7 @@
b = blockimgdiff.BlockImageDiff(tgt, src, threads=OPTIONS.worker_threads,
version=self.version,
disable_imgdiff=self.disable_imgdiff)
- tmpdir = tempfile.mkdtemp()
- OPTIONS.tempfiles.append(tmpdir)
- self.path = os.path.join(tmpdir, partition)
+ self.path = os.path.join(MakeTempDir(), partition)
b.Compute(self.path)
self._required_cache = b.max_stashed_size
self.touched_src_ranges = b.touched_src_ranges