Backed out changeset caacf82afba1 (bug 1335873) for failing spidermonkey pkg due to not finding new file python.ini. r=backout

This commit is contained in:
Sebastian Hengst 2017-03-01 17:35:45 +01:00
parent 964fc701a8
commit 9da116023c
2 changed files with 2 additions and 9 deletions

View File

@ -218,7 +218,6 @@ def find_and_update_from_json(*dirs):
# First, see if we're in an objdir
try:
from mozbuild.base import MozbuildObject, BuildEnvironmentNotFoundException
from mozbuild.mozconfig import MozconfigFindException
build = MozbuildObject.from_environment()
json_path = _os.path.join(build.topobjdir, "mozinfo.json")
if _os.path.isfile(json_path):
@ -226,7 +225,7 @@ def find_and_update_from_json(*dirs):
return json_path
except ImportError:
pass
except (BuildEnvironmentNotFoundException, MozconfigFindException):
except BuildEnvironmentNotFoundException:
pass
for d in dirs:

View File

@ -83,13 +83,7 @@ class TestMozinfo(unittest.TestCase):
m = mock.MagicMock()
# Mock the value of MozbuildObject.from_environment().topobjdir.
m.MozbuildObject.from_environment.return_value.topobjdir = self.tempdir
mocked_modules = {
"mozbuild": m,
"mozbuild.base": m,
"mozbuild.mozconfig": m,
}
with mock.patch.dict(sys.modules, mocked_modules):
with mock.patch.dict(sys.modules, {"mozbuild": m, "mozbuild.base": m}):
self.assertEqual(mozinfo.find_and_update_from_json(), j)
self.assertEqual(mozinfo.info["foo"], "123456")