From 4f2bccf8bc855b277c34d1e288a27e1ffee06259 Mon Sep 17 00:00:00 2001 From: Staffan Malmgren Date: Sat, 5 Mar 2016 21:54:13 +0100 Subject: [PATCH] When running transforms under uwsgi, seems the configurationfile parameter to XSLT.transform needs to be an absolute path --- ferenda/transformer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ferenda/transformer.py b/ferenda/transformer.py index 839e8c31..5a06ab5e 100644 --- a/ferenda/transformer.py +++ b/ferenda/transformer.py @@ -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" @@ -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