mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Applied a bunch of suggestions from Simon.
This commit is contained in:
parent
d0489f1160
commit
4643737a1b
11 changed files with 384 additions and 389 deletions
|
@ -44,14 +44,7 @@ def abort(message):
|
|||
|
||||
def render(filename, **context):
|
||||
try:
|
||||
# Workaround the fact that we can have a different working directory when called, and Mako includes will fail
|
||||
# miserably if we don't give it proper instructions in the TemplateLookup.
|
||||
if os.getcwd().endswith("components/style"):
|
||||
properties_path = "properties"
|
||||
else:
|
||||
properties_path = "components/style/properties"
|
||||
|
||||
lookup = TemplateLookup(directories=[properties_path])
|
||||
lookup = TemplateLookup(directories=[BASE])
|
||||
template = Template(open(filename, "rb").read(),
|
||||
filename=filename,
|
||||
input_encoding="utf8",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue