Bug 1311122 - Ensure missing file errors get reported despite missing base path in l10n.py. r=glandium
authoraleth <aleth@instantbird.org>
Tue, 18 Oct 2016 21:06:36 +0200
changeset 319673 e47ad07f2d527ca78a01f022c177df8437b03b6a
parent 319672 cc3d6c32ed8016883293256289b614b1c677ccc3
child 319674 2d72443b3ab664c1c7fe039d58e5dee1f3e672fa
push id83215
push useraleth@instantbird.org
push dateThu, 27 Oct 2016 10:36:03 +0000
treeherdermozilla-inbound@e47ad07f2d52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1311122
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1311122 - Ensure missing file errors get reported despite missing base path in l10n.py. r=glandium
python/mozbuild/mozpack/packager/l10n.py
--- a/python/mozbuild/mozpack/packager/l10n.py
+++ b/python/mozbuild/mozpack/packager/l10n.py
@@ -166,18 +166,21 @@ def _repack(app_finder, l10n_finder, cop
             if base:
                 subpath = mozpath.relpath(p, base)
                 path = mozpath.normpath(mozpath.join(paths[base],
                                                                subpath))
         if path:
             files = [f for p, f in l10n_finder.find(path)]
             if not len(files):
                 if base not in non_chrome:
+                    finderBase = ""
+                    if hasattr(l10n_finder, 'base'):
+                        finderBase = l10n_finder.base
                     errors.error("Missing file: %s" %
-                                 os.path.join(l10n_finder.base, path))
+                                 os.path.join(finderBase, path))
             else:
                 packager.add(path, files[0])
         else:
             packager.add(p, f)
 
     # Add localized manifest entries from the langpack.
     l10n_manifests = []
     for base in set(e.base for e in l10n.entries):