Bug 974281 - Use mozfile.remove since rmtree is deprecated; r=ted

My Python editor told me rmtree has been marked as deprecated. Use
mozfile.remove instead.

MozReview-Commit-ID: FYkXk1fnxvC

--HG--
extra : rebase_source : df392e8832e52501950f09acda208943c9e3d707
This commit is contained in:
Gregory Szorc 2016-03-11 15:08:54 -08:00
Родитель 1f45b8a760
Коммит 303d2ef97a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -16,7 +16,7 @@ import which
from mach.mixin.logging import LoggingMixin
from mach.mixin.process import ProcessExecutionMixin
from mozfile.mozfile import rmtree
from mozfile.mozfile import remove as mozfileremove
from .backend.configenvironment import ConfigEnvironment
from .controller.clobber import Clobberer
@ -306,7 +306,7 @@ class MozbuildObject(ProcessExecutionMixin):
else:
# We use mozfile because it is faster than shutil.rmtree().
# mozfile doesn't like unicode arguments (bug 818783).
rmtree(self.topobjdir.encode('utf-8'))
mozfileremove(self.topobjdir.encode('utf-8'))
def get_binary_path(self, what='app', validate_exists=True, where='default'):
"""Obtain the path to a compiled binary for this build configuration.