From 770a0bd827ed2a052bcf026105af64f96b24d634 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Mon, 16 Mar 2015 08:18:39 +0900 Subject: [PATCH] Bug 1143510 - Fix line numbers for removal errors during make package. r=gps --- toolkit/mozapps/installer/packager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py index fb6356a6797..c48789d708c 100644 --- a/toolkit/mozapps/installer/packager.py +++ b/toolkit/mozapps/installer/packager.py @@ -179,6 +179,8 @@ class RemovedFiles(GeneratedFile): def handle_line(self, str): f = str.strip() + if not f: + return if self.copier.contains(f): errors.error('Removal of packaged file(s): %s' % f) self.content += f + '\n' @@ -344,8 +346,7 @@ def main(): sink.close(args.manifest is not None) if args.removals: - lines = [l.lstrip() for l in open(args.removals).readlines()] - removals_in = StringIO(''.join(lines)) + removals_in = StringIO(open(args.removals).read()) removals_in.name = args.removals removals = RemovedFiles(copier) preprocess(removals_in, removals, defines)