Skip to content

Commit

Permalink
gyp: make cmake python3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed Oct 28, 2019
1 parent 9c0f340 commit 6162dba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gyp/pylib/gyp/generator/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def StringToCMakeTargetName(a):
Invalid for make: ':'
Invalid for unknown reasons but cause failures: '.'
"""
return a.translate(string.maketrans(' /():."', '_______'))
try:
return a.translate(str.maketrans(' /():."', '_______'))
except AttributeError:
return a.translate(string.maketrans(' /():."', '_______'))


def WriteActions(target_name, actions, extra_sources, extra_deps,
Expand Down

0 comments on commit 6162dba

Please sign in to comment.