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
Родитель 1f6b9a7846
Коммит 2a81b7cc9b
1 изменённых файлов: 4 добавлений и 5 удалений

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

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