summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-28 16:30:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-06 10:27:59 +0000
commit810f4827b6bec0908c2ee186cfae95834e611f9d (patch)
tree5c3e87388caf21c60b59498231130372e83aec58 /bitbake/lib
parent5ab68ca832900589ad4a89841992097645d09e97 (diff)
downloadpoky-810f4827b6bec0908c2ee186cfae95834e611f9d.tar.gz
bitbake: 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()) (Bitbake rev: c36803dba4fce8e6b16e437d702116a918ff718b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/server/process.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index ed930c61f4..786877bc44 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -489,7 +489,8 @@ def connectProcessServer(sockname, featureset):
489 command_chan.close() 489 command_chan.close()
490 for i in [writefd, readfd1, writefd2]: 490 for i in [writefd, readfd1, writefd2]:
491 try: 491 try:
492 os.close(i) 492 if i:
493 os.close(i)
493 except OSError: 494 except OSError:
494 pass 495 pass
495 sock.close() 496 sock.close()