From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8DE8615800A for ; Tue, 29 Aug 2023 01:38:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C15812BC014; Tue, 29 Aug 2023 01:38:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A5C592BC014 for ; Tue, 29 Aug 2023 01:38:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C77A2340B46 for ; Tue, 29 Aug 2023 01:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55F37B84 for ; Tue, 29 Aug 2023 01:38:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1693272077.fb45df369b4be7061fc14f5eb361c4d6c97e3f02.sam@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/merge-driver-ekeyword X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: fb45df369b4be7061fc14f5eb361c4d6c97e3f02 X-VCS-Branch: master Date: Tue, 29 Aug 2023 01:38:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 01b96638-d7a2-4ddb-81b9-f41bf6af7f6f X-Archives-Hash: 0ce6fb29c615570f52df891e09c80670 commit: fb45df369b4be7061fc14f5eb361c4d6c97e3f02 Author: Sam James gentoo org> AuthorDate: Tue Aug 29 01:21:04 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue Aug 29 01:21:17 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=fb45df36 bin/merge-driver-ekeyword: mangle exit code correctly Fixes: 263e3d64adac1ee2968233e151d1ee590532f42d Signed-off-by: Sam James gentoo.org> bin/merge-driver-ekeyword | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/merge-driver-ekeyword b/bin/merge-driver-ekeyword index e59e10c..0235a98 100755 --- a/bin/merge-driver-ekeyword +++ b/bin/merge-driver-ekeyword @@ -1,6 +1,6 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -# Copyright 2020 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 or later """ @@ -127,8 +127,10 @@ def main(argv: Sequence[str]) -> int: sys.exit(result) else: result = os.system(f"git merge-file -L HEAD -L base -L ours {A} {O} {B}") + result = os.waitstatus_to_exitcode(result) + if result < 0 or result >= 128: + sys.exit(-1) sys.exit(result) - if __name__ == "__main__": main(sys.argv)