Skip to content

Commit

Permalink
Bug 1143510 - Fix line numbers for removal errors during make package…
Browse files Browse the repository at this point in the history
…. r=gps
  • Loading branch information
glandium committed Mar 17, 2015
1 parent 7182517 commit d44ec11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions toolkit/mozapps/installer/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def __init__(self, copier):

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'
Expand Down Expand Up @@ -344,8 +346,7 @@ def is_native(path):
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)
Expand Down

0 comments on commit d44ec11

Please sign in to comment.