From 37c755e70721fa49d9c344158592761a75b124d3 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 23 Jun 2025 22:32:56 +0900 Subject: [PATCH] Drop logic for Python < 3 Python 2 support was removed globally multiple cycles ago. Change-Id: I503ef9be68e59c8983d245f1fbb689651eb564ff --- tools/outfilter.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/outfilter.py b/tools/outfilter.py index 55f9ee1487..df03a779b5 100644 --- a/tools/outfilter.py +++ b/tools/outfilter.py @@ -90,13 +90,10 @@ def main(): if outfile: # We've opened outfile as a binary file to get the - # non-buffered behaviour. on python3, sys.stdin was + # non-buffered behaviour. on python3, sys.stdin was # opened with the system encoding and made the line into # utf-8, so write the logfile out in utf-8 bytes. - if sys.version_info < (3,): - outfile.write(ts_line) - else: - outfile.write(ts_line.encode('utf-8')) + outfile.write(ts_line.encode('utf-8')) outfile.flush()