[Piglit] [PATCH 2/6] framework: Add mako version to template path
Dylan Baker
baker.dylan.c at gmail.com
Thu Mar 3 01:20:58 UTC 2016
After an hour+ of "WTF doesn't this work?" it turns out loading cached
templates for a different version of mako breaks things. So don't do
that.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/summary/html_.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index 2c0f72f..947a89e 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -33,6 +33,7 @@ import sys
import errno
from mako.lookup import TemplateLookup
+import mako
import six
# a local variable status exists, prevent accidental overloading by renaming
@@ -50,7 +51,8 @@ __all__ = [
_TEMP_DIR = os.path.join(
tempfile.gettempdir(),
"piglit-{}".format(getpass.getuser()),
- 'version-{}'.format(sys.version.split()[0]))
+ 'python-{}'.format(sys.version.split()[0]),
+ 'mako-{}'.format(mako.__version__))
_TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), '../..', 'templates')
_TEMPLATES = TemplateLookup(
_TEMPLATE_DIR,
--
2.7.2
More information about the Piglit
mailing list