From 41a3f133d36dc17912df78a0fa5e7b2ccd1ac740 Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Thu, 1 Aug 2013 13:52:27 -0400 Subject: [PATCH] bug 899849 - fix MozbuildObject.from_environment to work right when no mozconfig specified. r=gps --- python/mozbuild/mozbuild/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py index 9bc56d43bf4..bb19ca90e23 100644 --- a/python/mozbuild/mozbuild/base.py +++ b/python/mozbuild/mozbuild/base.py @@ -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.