mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
servo: Merge #10527 - Work around a Mako bug on Windows (from servo:cr); r=larsbergstrom
http://logs.glob.uno/?c=mozilla%23servo#c403766 https://i.imgur.com/j5Zv4LX.png https://bitbucket.org/zzzeek/mako/issues/150/line-ending-handling-broken-on-win32 r? @larsbergstrom Source-Repo: https://github.com/servo/servo Source-Revision: 11927da1659baec54102fa4609001f073216d7b3
This commit is contained in:
parent
1257225e1e
commit
a095bdc18b
@ -50,8 +50,8 @@ import sys
|
||||
from mako.template import Template
|
||||
from mako import exceptions
|
||||
try:
|
||||
print(Template(filename=os.environ['TEMPLATE'], input_encoding='utf8').render(PRODUCT=os.environ['PRODUCT'])
|
||||
.encode('utf8'))
|
||||
template = Template(open(os.environ['TEMPLATE'], 'rb').read(), input_encoding='utf8')
|
||||
print(template.render(PRODUCT=os.environ['PRODUCT']).encode('utf8'))
|
||||
except:
|
||||
sys.stderr.write(exceptions.text_error_template().render().encode('utf8'))
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user