Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / extlibs / mbedtls / mbedtls / scripts / abi_check.py
index 502c7ae..b2b1eb2 100755 (executable)
@@ -167,7 +167,7 @@ class AbiChecker(object):
         """Generate the ABI dumps for the specified git revision.
         The shared libraries must have been built and the module paths
         present in version.modules."""
-        for mbed_module, module_path in version.modules.items():
+        for mbed_module, module_path in list(version.modules.items()):
             output_path = os.path.join(
                 self.report_dir, "{}-{}-{}.dump".format(
                     mbed_module, version.revision, version.version
@@ -281,7 +281,7 @@ class AbiChecker(object):
                 if not (self.keep_all_reports or self.brief):
                     os.remove(output_path)
         for version in [self.old_version, self.new_version]:
-            for mbed_module, mbed_module_dump in version.abi_dumps.items():
+            for mbed_module, mbed_module_dump in list(version.abi_dumps.items()):
                 os.remove(mbed_module_dump)
         if self.can_remove_report_dir:
             os.rmdir(self.report_dir)
@@ -365,7 +365,7 @@ def run_main():
         )
         abi_args = parser.parse_args()
         if os.path.isfile(abi_args.report_dir):
-            print("Error: {} is not a directory".format(abi_args.report_dir))
+            print(("Error: {} is not a directory".format(abi_args.report_dir)))
             parser.exit()
         old_version = SimpleNamespace(
             version="old",