mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
translator: Add Python 3 support (see issue #2856)
This also fixes incorrect translation of types in capi header comments.
This commit is contained in:
@ -6,6 +6,8 @@
|
||||
A simple utility function to merge pack resource files into a single resource file.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
from date_util import *
|
||||
from file_util import *
|
||||
import os
|
||||
@ -114,7 +116,7 @@ def MakeFile(output, input):
|
||||
result = result.replace('$YEAR$', get_year())
|
||||
# add the guard string
|
||||
filename = os.path.split(output)[1]
|
||||
guard = 'CEF_INCLUDE_' + string.upper(filename.replace('.', '_')) + '_'
|
||||
guard = 'CEF_INCLUDE_' + filename.replace('.', '_').upper() + '_'
|
||||
result = result.replace('$GUARD$', guard)
|
||||
|
||||
if path_exists(output):
|
||||
@ -131,8 +133,8 @@ def MakeFile(output, input):
|
||||
|
||||
def main(argv):
|
||||
if len(argv) < 3:
|
||||
print("Usage:\n %s <output_filename> <input_file1> [input_file2] ... " %
|
||||
argv[0])
|
||||
print(("Usage:\n %s <output_filename> <input_file1> [input_file2] ... " %
|
||||
argv[0]))
|
||||
sys.exit(-1)
|
||||
MakeFile(argv[1], argv[2:])
|
||||
|
||||
|
Reference in New Issue
Block a user