зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1728671: Use gettempdir() instead of tempdir r=firefox-build-system-reviewers,glandium
The `tempfile.tempdir` cache value isn't always populated, but `tempfile.gettempdir()` always is. They both provide the same result. Differential Revision: https://phabricator.services.mozilla.com/D124261
This commit is contained in:
Родитель
c87975af29
Коммит
80ed655270
|
@ -41,7 +41,7 @@ class ConfigureTestVFS(object):
|
|||
self._paths = set(mozpath.abspath(p) for p in paths)
|
||||
|
||||
def _real_file(self, path):
|
||||
return mozpath.basedir(path, [topsrcdir, topobjdir, tempfile.tempdir])
|
||||
return mozpath.basedir(path, [topsrcdir, topobjdir, tempfile.gettempdir()])
|
||||
|
||||
def exists(self, path):
|
||||
if path in self._paths:
|
||||
|
|
|
@ -284,7 +284,7 @@ class TestWriteMozinfo(unittest.TestCase, Base):
|
|||
MOZ_WIDGET_TOOLKIT="windows",
|
||||
)
|
||||
)
|
||||
tempdir = tempfile.tempdir
|
||||
tempdir = tempfile.gettempdir()
|
||||
c.topsrcdir = tempdir
|
||||
with NamedTemporaryFile(
|
||||
dir=os.path.normpath(c.topsrcdir), mode="wt"
|
||||
|
|
Загрузка…
Ссылка в новой задаче