diff options
author | Peter Simons <simons@cryp.to> | 2010-10-20 20:07:31 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-10-20 20:07:31 +0200 |
commit | 99d13f0429e3a3af2b46b617d776b9d46d6c5438 (patch) | |
tree | 8ccf8cedad4c7213ac26561fc6af7d97ab2e16ad /macro.py | |
parent | 82ac11a5e40c32a7c7a30d2868d12e5b6c093d79 (diff) | |
download | autoconf-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-x | macro.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |