From 60d714e0c31f2ba188a66e16922992f5d02cd5bd Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Sat, 21 Jan 2023 15:05:17 -0500 Subject: [PATCH] tools: allow icutrim.py to run on python2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/build/issues/2998 Small icu seems broken from 14.x since it uses python2. Although main no longer supports python2 landing and backporting this change to the 14.x line would allow us to simplify future backports as currently the files are the same across lines. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/46263 Reviewed-By: Yagiz Nizipli Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- tools/icu/icutrim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/icu/icutrim.py b/tools/icu/icutrim.py index f857e73bbce298..0ae8c23319db93 100755 --- a/tools/icu/icutrim.py +++ b/tools/icu/icutrim.py @@ -316,7 +316,7 @@ def removeList(count=0): erritems = fi.readlines() fi.close() #Item zone/zh_Hant_TW.res depends on missing item zone/zh_Hant.res - pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*", 'utf-8')) + pat = re.compile(br"^Item ([^ ]+) depends on missing item ([^ ]+).*") for i in range(len(erritems)): line = erritems[i].strip() m = pat.match(line)