Skip to content

Commit

Permalink
gyp: iteritems() -> items() in compile_commands_json.py
Browse files Browse the repository at this point in the history
PR-URL: #1947
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
cclauss authored and rvagg committed Oct 30, 2019
1 parent d8e09a1 commit c0282da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gyp/pylib/gyp/generator/compile_commands_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def CalculateVariables(default_variables, params):

def AddCommandsForTarget(cwd, target, params, per_config_commands):
output_dir = params['generator_flags']['output_dir']
for configuration_name, configuration in target['configurations'].iteritems():
for configuration_name, configuration in target['configurations'].items():
builddir_name = os.path.join(output_dir, configuration_name)

if IsMac(params):
Expand Down Expand Up @@ -92,7 +92,7 @@ def resolve(filename):

def GenerateOutput(target_list, target_dicts, data, params):
per_config_commands = {}
for qualified_target, target in target_dicts.iteritems():
for qualified_target, target in target_dicts.items():
build_file, target_name, toolset = (
gyp.common.ParseQualifiedTarget(qualified_target))
if IsMac(params):
Expand All @@ -102,7 +102,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
AddCommandsForTarget(cwd, target, params, per_config_commands)

output_dir = params['generator_flags']['output_dir']
for configuration_name, commands in per_config_commands.iteritems():
for configuration_name, commands in per_config_commands.items():
filename = os.path.join(output_dir,
configuration_name,
'compile_commands.json')
Expand Down

0 comments on commit c0282da

Please sign in to comment.