summaryrefslogtreecommitdiff
path: root/macro.py
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2010-10-20 20:07:31 +0200
committerPeter Simons <simons@cryp.to>2010-10-20 20:07:31 +0200
commit99d13f0429e3a3af2b46b617d776b9d46d6c5438 (patch)
tree8ccf8cedad4c7213ac26561fc6af7d97ab2e16ad /macro.py
parent82ac11a5e40c32a7c7a30d2868d12e5b6c093d79 (diff)
downloadautoconf-archive-99d13f0429e3a3af2b46b617d776b9d46d6c5438.tar.gz
macro.py, macro2m4.py: minor fixes to make those scripts run with Python 3
Diffstat (limited to 'macro.py')
-rwxr-xr-xmacro.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/macro.py b/macro.py
index d8192cf..36dabc8 100755
--- a/macro.py
+++ b/macro.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-from __future__ import with_statement
+
from contextlib import closing
import re
import os.path as path
@@ -70,7 +70,7 @@ class Macro:
# 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
- header = map(lambda l: l[2:], header.split('\n'))
+ header = [l[2:] for l in header.split('\n')]
# set defaults
self.authors = []
# parse each section in the remaining list