diff options
author | 2024-05-28 19:15:35 -0400 | |
---|---|---|
committer | 2024-06-07 11:02:43 -0400 | |
commit | 6f191a5c058c26722a9a16d8f03e04b0ffbef3cf (patch) | |
tree | 8b4ad04d66ee12c81164a99a497589d959672c13 | |
parent | bin/merge-driver-ekeyword: Don't sys.exit() from main() (diff) | |
download | gentoolkit-6f191a5c058c26722a9a16d8f03e04b0ffbef3cf.tar.gz gentoolkit-6f191a5c058c26722a9a16d8f03e04b0ffbef3cf.tar.bz2 gentoolkit-6f191a5c058c26722a9a16d8f03e04b0ffbef3cf.zip |
bin/merge-driver-ekeyword: Don't pass program name to main()
Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rwxr-xr-x | bin/merge-driver-ekeyword | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/merge-driver-ekeyword b/bin/merge-driver-ekeyword index 9a7a666..59527bb 100755 --- a/bin/merge-driver-ekeyword +++ b/bin/merge-driver-ekeyword @@ -112,13 +112,13 @@ def apply_keyword_changes(ebuild: str, pathname: str, def main(argv: Sequence[str]) -> int: - if len(argv) != 5: + if len(argv) != 4: return -1 - O = argv[1] # %O - filename of original - A = argv[2] # %A - filename of our current version - B = argv[3] # %B - filename of the other branch's version - P = argv[4] # %P - original path of the file + O = argv[0] # %O - filename of original + A = argv[1] # %A - filename of our current version + B = argv[2] # %B - filename of the other branch's version + P = argv[3] # %P - original path of the file # Get changes to KEYWORDS= from %O to %B if changes := keyword_changes(O, B): @@ -140,4 +140,4 @@ def main(argv: Sequence[str]) -> int: if __name__ == "__main__": - sys.exit(main(sys.argv)) + sys.exit(main(sys.argv[1:])) |