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:26:38 +0000 |
commit | bdffac83bcbd12668d262867f3a6e329327ff1e4 (patch) | |
tree | 12a6702e6d919ac5c208a662bc150f1e735e87c1 | |
parent | 115919f0c11e22df783348422e06ab95f5c943e1 (diff) | |
download | bitbake-contrib-bdffac83bcbd12668d262867f3a6e329327ff1e4.tar.gz |
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
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/server/process.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index 2246d954c..028138ad0 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -451,6 +451,9 @@ def connectProcessServer(sockname, featureset): # AF_UNIX has path length issues so chdir here to workaround cwd = os.getcwd() + readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None + eq = command_chan_recv = command_chan = None + try: try: os.chdir(os.path.dirname(sockname)) @@ -458,9 +461,6 @@ def connectProcessServer(sockname, featureset): finally: os.chdir(cwd) - readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None - eq = command_chan_recv = command_chan = None - # Send an fd for the remote to write events to readfd, writefd = os.pipe() eq = BBUIEventQueue(readfd) |