From 27310974e0598e50f87ed51d34a56953e39a8eb6 Mon Sep 17 00:00:00 2001 From: Ibrahn Sahir Date: Mon, 28 May 2018 18:41:16 +0100 Subject: fixed building using scons with python3 I broke python 3 builds by using py2 specific dict functions in commit 98846b39ee039358584884b439b96e799f1d2bd0 Fixed with functions in compat.py --- methods.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'methods.py') diff --git a/methods.py b/methods.py index b5aee9c22..6dca826b2 100644 --- a/methods.py +++ b/methods.py @@ -1,5 +1,5 @@ import os -from compat import iteritems, open_utf8, escape_string +from compat import iteritems, itervalues, open_utf8, escape_string def add_source_files(self, sources, filetype, lib_env=None, shared=False): @@ -661,7 +661,7 @@ def make_license_header(target, source, env): reader.next_line() data_list = [] - for project in projects.itervalues(): + for project in itervalues(projects): for part in project: part["file_index"] = len(data_list) data_list += part["Files"] @@ -703,7 +703,7 @@ def make_license_header(target, source, env): f.write("const ComponentCopyrightPart COPYRIGHT_PROJECT_PARTS[] = {\n") part_index = 0 part_indexes = {} - for project_name, project in projects.iteritems(): + for project_name, project in iteritems(projects): part_indexes[project_name] = part_index for part in project: f.write("\t{ \"" + escape_string(part["License"][0]) + "\", " @@ -717,7 +717,7 @@ def make_license_header(target, source, env): f.write("const int COPYRIGHT_INFO_COUNT = " + str(len(projects)) + ";\n") f.write("const ComponentCopyright COPYRIGHT_INFO[] = {\n") - for project_name, project in projects.iteritems(): + for project_name, project in iteritems(projects): f.write("\t{ \"" + escape_string(project_name) + "\", " + "©RIGHT_PROJECT_PARTS[" + str(part_indexes[project_name]) + "], " + str(len(project)) + " },\n") -- cgit v1.2.3-70-g09d2