summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/TGenshi.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-07-25 14:54:08 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-07-25 14:54:08 +0000
commit8427842859e2e72ea4c9b373ffd8a9aeb0f2d31b (patch)
treebb4a5bb20f3d7caae8b7230b821d9801596da216 /src/lib/Server/Plugins/TGenshi.py
parent73a1d2d66ea0ea4eb04ff76e360dc7cf0d7bafc4 (diff)
downloadbcfg2-8427842859e2e72ea4c9b373ffd8a9aeb0f2d31b.tar.gz
bcfg2-8427842859e2e72ea4c9b373ffd8a9aeb0f2d31b.tar.bz2
bcfg2-8427842859e2e72ea4c9b373ffd8a9aeb0f2d31b.zip
Add support for altsrc bindings to TGenshi
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3562 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/TGenshi.py')
-rw-r--r--src/lib/Server/Plugins/TGenshi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/TGenshi.py b/src/lib/Server/Plugins/TGenshi.py
index da6dcf956..419c73f32 100644
--- a/src/lib/Server/Plugins/TGenshi.py
+++ b/src/lib/Server/Plugins/TGenshi.py
@@ -50,8 +50,11 @@ class TemplateFile:
def BuildFile(self, entry, metadata):
'''Build literal file information'''
+ fname = entry.get('realname', entry.get('name'))
try:
- stream = self.template.generate(name=entry.get('name'), metadata=metadata, properties=self.properties)
+ stream = self.template.generate(name=fname,
+ metadata=metadata,
+ properties=self.properties)
if isinstance(self.template, TextTemplate):
entry.text = stream.render('text')
else: