Skip to content

Commit

Permalink
When running transforms under uwsgi, seems the configurationfile para…
Browse files Browse the repository at this point in the history
…meter to XSLT.transform needs to be an absolute path
  • Loading branch information
staffanm committed Mar 5, 2016
1 parent 7daca4f commit 4f2bccf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ferenda/transformer.py
Expand Up @@ -18,7 +18,6 @@
# you want to use a different template, create a different
# transformer.


class Transformer(object):

"""Transforms parsed "pure content" documents into "browser-ready"
Expand Down Expand Up @@ -241,7 +240,8 @@ def transform(self, indata, config=None, parameters={}):
config = config.replace(os.sep, "/")
# print("Tranform: Using config %s. Contents:" % config)
# print(util.readfile(config))
strparams['configurationfile'] = XSLT.strparam(config)
config_fullpath = os.path.abspath(config)
strparams['configurationfile'] = XSLT.strparam(config_fullpath)
for key, value in parameters.items():
if key.endswith("file"):
# relativize path of file relative to the XSL file
Expand Down

0 comments on commit 4f2bccf

Please sign in to comment.