From 28a7202ac5589d25816dbbd0f6f47a3e70eb7684 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Wed, 31 May 2023 14:42:46 -0500 Subject: bitbake: server: Fix crash when checking lock file Fixes a crash when the server process attempts to check the PID of the lock file that resulted because an integer (os.getpid()) was attempting to be concatenated to a string (Bitbake rev: 5d499682a0a739b5269247a8f6dbb874e3eec456) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index db417c8428..7616ef53c8 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -375,7 +375,7 @@ class ProcessServer(): lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False) if not lock: newlockcontents = get_lock_contents(lockfile) - if not newlockcontents[0].startswith([os.getpid() + "\n", os.getpid() + " "]): + if not newlockcontents[0].startswith([f"{os.getpid()}\n", f"{os.getpid()} "]): # A new server was started, the lockfile contents changed, we can exit serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents)) return -- cgit v1.2.3-54-g00ecf