From 98bacc9eff376513e5415175db00e6a869eb86a5 Mon Sep 17 00:00:00 2001 From: Filippo Giunchedi Date: Sat, 18 Jul 2009 18:45:43 +0200 Subject: compatibility with st 3.1 StringTemplateGroup pass file kwarg with a open() file instead of fileName which is 3.2 only --- macro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'macro.py') diff --git a/macro.py b/macro.py index ca87057..709876d 100755 --- a/macro.py +++ b/macro.py @@ -123,7 +123,7 @@ if __name__ == "__main__": opts.add_option('', "--output-suffix", dest = "suffix", default = ".m4") (options, args) = opts.parse_args() stFile = args.pop(0) - formatter = StringTemplateGroup(fileName = stFile, lexer = options.lexer) + formatter = StringTemplateGroup(file = open(stFile), lexer = options.lexer) for m4File in args: (stem,suff) = path.splitext(path.basename(m4File)) assert suff == ".m4" -- cgit v1.2.1