diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-09 15:57:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-06 10:28:04 +0000 |
commit | caf1c2c1ef9b6feabea816344dd5c0ca9de08e85 (patch) | |
tree | 3fac12b269f05d806c7c09b8a564719203d30919 | |
parent | 005d59b13d141869a2c079544f2545c9e3624789 (diff) | |
download | poky-caf1c2c1ef9b6feabea816344dd5c0ca9de08e85.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: bdffac83bcbd12668d262867f3a6e329327ff1e4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/server/process.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 2246d954ce..028138ad02 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -451,6 +451,9 @@ def connectProcessServer(sockname, featureset): | |||
451 | # AF_UNIX has path length issues so chdir here to workaround | 451 | # AF_UNIX has path length issues so chdir here to workaround |
452 | cwd = os.getcwd() | 452 | cwd = os.getcwd() |
453 | 453 | ||
454 | readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None | ||
455 | eq = command_chan_recv = command_chan = None | ||
456 | |||
454 | try: | 457 | try: |
455 | try: | 458 | try: |
456 | os.chdir(os.path.dirname(sockname)) | 459 | os.chdir(os.path.dirname(sockname)) |
@@ -458,9 +461,6 @@ def connectProcessServer(sockname, featureset): | |||
458 | finally: | 461 | finally: |
459 | os.chdir(cwd) | 462 | os.chdir(cwd) |
460 | 463 | ||
461 | readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None | ||
462 | eq = command_chan_recv = command_chan = None | ||
463 | |||
464 | # Send an fd for the remote to write events to | 464 | # Send an fd for the remote to write events to |
465 | readfd, writefd = os.pipe() | 465 | readfd, writefd = os.pipe() |
466 | eq = BBUIEventQueue(readfd) | 466 | eq = BBUIEventQueue(readfd) |