bug 899849 - fix MozbuildObject.from_environment to work right when no mozconfig specified. r=gps

This commit is contained in:
Ted Mielczarek 2013-08-01 13:52:27 -04:00
parent 1b0effcf03
commit 41a3f133d3

View File

@ -135,11 +135,10 @@ class MozbuildObject(ProcessExecutionMixin):
topsrcdir = dir_path
break
if not topsrcdir:
# See if we're running from a Python virtualenv that's inside an objdir.
mozinfo_path = os.path.join(os.path.dirname(sys.prefix), "mozinfo.json")
if os.path.isfile(mozinfo_path):
topsrcdir, topobjdir, mozconfig = load_mozinfo(mozinfo_path)
# See if we're running from a Python virtualenv that's inside an objdir.
mozinfo_path = os.path.join(os.path.dirname(sys.prefix), "mozinfo.json")
if os.path.isfile(mozinfo_path):
topsrcdir, topobjdir, mozconfig = load_mozinfo(mozinfo_path)
# If we were successful, we're only guaranteed to find a topsrcdir. If
# we couldn't find that, there's nothing we can do.