Bug 1306214 part 1 - Make mach devtools-css-db windows-compatible. r=tromey
MozReview-Commit-ID: AmF1uAooikW
This commit is contained in:
@@ -112,13 +112,13 @@ class MachCommands(MachCommandBase):
|
||||
destination_path = resolve_path(self.topsrcdir,
|
||||
'devtools/shared/css/generated/properties-db.js')
|
||||
|
||||
with open(js_template_path, 'r') as handle:
|
||||
with open(js_template_path, 'rb') as handle:
|
||||
js_template = handle.read()
|
||||
|
||||
preamble = '/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT */\n\n'
|
||||
contents = string.Template(js_template).substitute(substitutions)
|
||||
|
||||
with open(destination_path, 'w') as destination:
|
||||
with open(destination_path, 'wb') as destination:
|
||||
destination.write(preamble + contents)
|
||||
|
||||
print('The database was successfully generated at ' + destination_path)
|
||||
|
||||
Reference in New Issue
Block a user