diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-28 16:30:12 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-06 10:24:43 +0000 |
commit | c36803dba4fce8e6b16e437d702116a918ff718b (patch) | |
tree | ab912cc8785d8f0a4e28ad6a090f1d0c1953fa87 | |
parent | 9c619f1eb1583582fafda6acabaf08a5761215ef (diff) | |
download | bitbake-contrib-c36803dba4fce8e6b16e437d702116a918ff718b.tar.gz |
server/process: Fix ConnectionRefusedError tracebacks
Improve connetion refused error handling:
NOTE: Retrying server connection...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection... (Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 471, in connectProcessServer
sock.connect(os.path.basename(sockname))
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
server_connection = bb.server.process.connectProcessServer(sockname, featureset)
File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 502, in connectProcessServer
os.close(i)
TypeError: an integer is required (got type NoneType)
)
WARNING: /home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
logger.info("Retrying server connection... (%s)" % traceback.format_exc())
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/server/process.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index ed930c61f..786877bc4 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -489,7 +489,8 @@ def connectProcessServer(sockname, featureset): command_chan.close() for i in [writefd, readfd1, writefd2]: try: - os.close(i) + if i: + os.close(i) except OSError: pass sock.close() |