Skip to content

Commit

Permalink
Bug 982075 - Make addEntriesToListFile() in buildlist.py deterministi…
Browse files Browse the repository at this point in the history
…c. r=ted
  • Loading branch information
gk-tpo committed Mar 18, 2014
1 parent 895f37b commit d6d4b9c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/mozbuild/mozbuild/action/buildlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ def addEntriesToListFile(listFile, entries):
f.close()
else:
existing = set()
f = open(listFile, 'a')
for e in entries:
if e not in existing:
f.write("{0}\n".format(e))
existing.add(e)
f.close()
with open(listFile, 'w') as f:
f.write("\n".join(sorted(existing))+"\n")
finally:
lock = None

Expand Down

0 comments on commit d6d4b9c

Please sign in to comment.