summaryrefslogtreecommitdiff
path: root/macro.py
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2009-12-23 19:38:27 +0100
committerPeter Simons <simons@cryp.to>2009-12-23 19:38:27 +0100
commit4cb8ca3f2be106bdaf8d5a403a2d69bc241de03d (patch)
treeb750727693c387a7f17738636cf8f3308e315810 /macro.py
parent36145ced94bebf806d8191fdc9ec6a1aaa803172 (diff)
downloadautoconf-archive-4cb8ca3f2be106bdaf8d5a403a2d69bc241de03d.tar.gz
macro.py: assert that the header section of the macro files don't contain tabs
Diffstat (limited to 'macro.py')
-rwxr-xr-xmacro.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/macro.py b/macro.py
index 40262cb..ca697da 100755
--- a/macro.py
+++ b/macro.py
@@ -65,6 +65,8 @@ class Macro:
# header and body are separated by an empty line.
(header,body) = loadFile(filePath).split("\n\n", 1)
self.body = body.split('\n')
+ # headers may not contain tab characters
+ assert not ('\t' in header)
# drop initial header (if present)
header = re.sub(r"^\n*# =+\n#[^\n]*\n# =+\n(#\n)+", '', header, 1)
# split buffer into lines and drop initial "# " prefix in the process