From 911db4d3e4c1b02c36c13c0dea5e5890bc574ba0 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 22 Feb 2009 09:15:08 -0500 Subject: [PATCH] Pointful function. --- plugins/video/video.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/video/video.py b/plugins/video/video.py index a4296ac..cf0053a 100644 --- a/plugins/video/video.py +++ b/plugins/video/video.py @@ -22,12 +22,12 @@ SCRIPTDIR = os.path.dirname(__file__) CLASS_NAME = 'Video' # Preload the templates -tcname = os.path.join(SCRIPTDIR, 'templates', 'container.tmpl') -ttname = os.path.join(SCRIPTDIR, 'templates', 'TvBus.tmpl') -txname = os.path.join(SCRIPTDIR, 'templates', 'container.xsl') -CONTAINER_TEMPLATE = file(tcname, 'rb').read() -TVBUS_TEMPLATE = file(ttname, 'rb').read() -XSL_TEMPLATE = file(txname, 'rb').read() +def tmpl(name): + return file(os.path.join(SCRIPTDIR, 'templates', name), 'rb').read() + +CONTAINER_TEMPLATE = tmpl('container.tmpl') +TVBUS_TEMPLATE = tmpl('TvBus.tmpl') +XSL_TEMPLATE = tmpl('container.xsl') extfile = os.path.join(SCRIPTDIR, 'video.ext') try: -- 2.11.4.GIT