Skip to content
Snippets Groups Projects
Commit 19b4e6d5 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

mkexp: python2 compatibility (print future, str.isidentifier)

parent 34471a1d
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@
# $Id$
#
from __future__ import print_function
import copy
import io
import os
......@@ -227,7 +229,7 @@ def format_vars(section, key, log, fmt):
def replace(match):
result = match.group(1)
if result.isidentifier():
if re.match(r'[_A-Za-z][_A-Za-z0-9]*$', result):
log.add(result)
return fmt%result
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment