aboutsummaryrefslogtreecommitdiffstats
path: root/templatefile.py
diff options
context:
space:
mode:
authorPeter Seebach <seebs@laptop-seebs-net.local>2011-04-04 20:00:12 -0500
committerPeter Seebach <seebs@laptop-seebs-net.local>2011-04-04 20:00:12 -0500
commita7acd426ac69d94cfe5d40c436ede49cde1d8c8b (patch)
tree358ba8e1cfb7b5c6d02a768e7e6f9cc1b3a9e3ea /templatefile.py
parent885cf62aa3e2668413b13b513d46cdb2f687920e (diff)
downloadpseudo-a7acd426ac69d94cfe5d40c436ede49cde1d8c8b.tar.gz
pseudo-a7acd426ac69d94cfe5d40c436ede49cde1d8c8b.tar.bz2
pseudo-a7acd426ac69d94cfe5d40c436ede49cde1d8c8b.zip
Whitespace changes.
Diffstat (limited to 'templatefile.py')
-rw-r--r--templatefile.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/templatefile.py b/templatefile.py
index 11e002c..2789b22 100644
--- a/templatefile.py
+++ b/templatefile.py
@@ -16,7 +16,7 @@ class TemplateFile:
# empty footer if none specified:
self.sections['footer'] = []
- # empty per-port if none specified:
+ # empty per-port if none specified:
self.sections['port'] = []
# lines appended to body by default
@@ -47,10 +47,10 @@ class TemplateFile:
current.append(line)
self.template.close()
for section, data in self.sections.items():
- if len(data) > 0:
+ if len(data) > 0:
self.sections[section] = Template("\n".join(data))
- else:
- self.sections[section] = None
+ else:
+ self.sections[section] = None
# You need a file if this isn't a file-per-item
if not self.file_per_item:
@@ -92,20 +92,20 @@ class TemplateFile:
"""Emit a template, with optional interpolation of an item."""
if template == "copyright":
# hey, at least it's not a global variable, amirite?
- self.get_file(item)
- if self.file:
+ self.get_file(item)
+ if self.file:
self.file.write(TemplateFile.copyright)
elif template in self.sections:
templ = self.sections[template]
- if templ:
- self.get_file(item)
- if self.file:
+ if templ:
+ self.get_file(item)
+ if self.file:
self.file.write(templ.safe_substitute(item))
self.file.write("\n")
else:
print "Warning: Unknown template '%s'." % template
if self.file_per_item:
- if self.file:
+ if self.file:
self.file.close()
self.file = None