From 8e60795aa8a7c42bbf960dc0727f8b825af61ce8 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Tue, 16 Apr 2024 15:49:51 +0200 Subject: [PATCH] PICARD-2857: exit with 0 code if no error when connecting to an existing instance We had EXIT_NO_NEW_INSTANCE = 30403 code in this case, but it's a non-zero code and that's not expected when everything was normal. Only 8 bits were preserved on actual exit code (195). --- picard/tagger.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/picard/tagger.py b/picard/tagger.py index 4749b87d2..b13eccc1d 100644 --- a/picard/tagger.py +++ b/picard/tagger.py @@ -1506,8 +1506,6 @@ If a new instance will not be spawned files/directories will be passed to the ex def main(localedir=None, autoupdate=True): - EXIT_NO_NEW_INSTANCE = 30403 - # Some libs (ie. Phonon) require those to be set QtWidgets.QApplication.setApplicationName(PICARD_APP_NAME) QtWidgets.QApplication.setOrganizationName(PICARD_ORG_NAME) @@ -1561,8 +1559,7 @@ def main(localedir=None, autoupdate=True): # pipe has sent its args to existing one, doesn't need to start if not should_start: log.debug("No need for spawning a new instance, exiting...") - # just a custom exit code to show that picard instance wasn't created - sys.exit(EXIT_NO_NEW_INSTANCE) + sys.exit(0) try: from PyQt6.QtDBus import QDBusConnection