Bug 807525 - Have embedjs.py append newlines when not present. (r=till)

This commit is contained in:
Shu-yu Guo 2012-11-01 23:40:38 -07:00
parent 88229dd518
commit 46d2757561

View File

@ -17,7 +17,7 @@ def replaceErrorMsgs(source_files, messages_file, output_file):
if len(source_files) == 0:
return
for line in fileinput.input(source_files):
output.write(replaceMessages(line, messages))
output.write(replaceMessages(line if line[-1] == '\n' else line + '\n', messages))
def buildMessagesTable(messages_file):
table = {}
@ -48,4 +48,4 @@ def main():
js2c.JS2C([combined_file, macros_file], [output_file], { 'TYPE': 'CORE', 'COMPRESSION': 'off', 'DEBUG':debug })
if __name__ == "__main__":
main()
main()