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 319817 e47ad07f2d527ca78a01f022c177df8437b03b6a
parent 319706 cc3d6c32ed8016883293256289b614b1c677ccc3
child 319818 2d72443b3ab664c1c7fe039d58e5dee1f3e672fa
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1311122
milestone52.0a1
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):