Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mkexp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esmenv
mkexp
Commits
19b4e6d5
Commit
19b4e6d5
authored
2 years ago
by
Karl-Hermann Wieners
Browse files
Options
Downloads
Patches
Plain Diff
mkexp: python2 compatibility (print future, str.isidentifier)
parent
34471a1d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mkexp
+3
-1
3 additions, 1 deletion
mkexp
with
3 additions
and
1 deletion
mkexp
+
3
−
1
View file @
19b4e6d5
...
...
@@ -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
re
sult
.
isidentifier
(
):
if
re
.
match
(
r
'
[_A-Za-z][_A-Za-z0-9]*$
'
,
result
):
log
.
add
(
result
)
return
fmt
%
result
return
result
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment