From 34b0cc11a811df121eadc116c9d3f2edfe9b27f5 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 17 Aug 2021 14:46:59 -0700 Subject: [PATCH] init: python3. I've actually left the two other scripts on python2, since they're not used in the build, and I don't actually know whether anyone's still using them manually. Leaving them on python2 should be a sign to future maintainers (assuming they're far enough in the future) that maybe no-one's using them and they can just be deleted instead. Test: treehugger Change-Id: I4d7dfdbf9f2a34ddd15cd4be077eeef2248cc596 --- init/host_builtin_map.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/init/host_builtin_map.py b/init/host_builtin_map.py index 6afcb173c..41c86ac8a 100755 --- a/init/host_builtin_map.py +++ b/init/host_builtin_map.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Generates the builtins map to be used by host_init_verifier. It copies the builtin function map from builtins.cpp, then replaces do_xxx() functions with the @@ -39,8 +39,7 @@ for line in function_map: match = DO_REGEX.match(line) if match: if match.group(1) in check_functions: - print line.replace('do_', 'check_'), + line = line.replace('do_', 'check_') else: - print FUNCTION_REGEX.sub('check_stub', line), - else: - print line, + line = FUNCTION_REGEX.sub('check_stub', line) + print(line, end=' ')