summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-09 15:57:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-14 11:18:18 +0000
commit57e290371b00f6b695c6f3220f9860f0a16cd0c9 (patch)
tree086b647264678bb00df176dfadf3ddfc8295b4f7
parent1c7bc2ff9d3f63f829d6c8086728144fc3daf5c1 (diff)
downloadpoky-57e290371b00f6b695c6f3220f9860f0a16cd0c9.tar.gz
bitbake: lib/bb/server: Avoid UnboundLocalError traceback
Traceback (most recent call last): File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake server_connection = bb.server.process.connectProcessServer(sockname, featureset) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/server/process.py", line 490, in connectProcessServer if command_chan_recv: UnboundLocalError: local variable 'command_chan_recv' referenced before assignment (Bitbake rev: ad79fadd855f5c10242ed17e9e0f3eb0274f26d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/server/process.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index ed930c61f4..0cae41cf86 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -452,6 +452,9 @@ def connectProcessServer(sockname, featureset):
452 # AF_UNIX has path length issues so chdir here to workaround 452 # AF_UNIX has path length issues so chdir here to workaround
453 cwd = os.getcwd() 453 cwd = os.getcwd()
454 454
455 readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
456 eq = command_chan_recv = command_chan = None
457
455 try: 458 try:
456 try: 459 try:
457 os.chdir(os.path.dirname(sockname)) 460 os.chdir(os.path.dirname(sockname))
@@ -459,9 +462,6 @@ def connectProcessServer(sockname, featureset):
459 finally: 462 finally:
460 os.chdir(cwd) 463 os.chdir(cwd)
461 464
462 readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
463 eq = command_chan_recv = command_chan = None
464
465 # Send an fd for the remote to write events to 465 # Send an fd for the remote to write events to
466 readfd, writefd = os.pipe() 466 readfd, writefd = os.pipe()
467 eq = BBUIEventQueue(readfd) 467 eq = BBUIEventQueue(readfd)