summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
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-01 11:32:08 +0000
commit3be7080d82a63325db51e816d42a2808bdd66124 (patch)
tree16a93df4d07b1fc7c4ffdccebce2e5aca8366429 /bitbake/lib/bb
parent41d89552620bfbc94031d314e6b3d0324f7a330e (diff)
downloadpoky-3be7080d82a63325db51e816d42a2808bdd66124.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: 6998fd816ceb0034c852a8fb994901fdf1975cfd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-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 efb4332394..81617acd96 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -499,7 +499,8 @@ def connectProcessServer(sockname, featureset):
499 command_chan.close() 499 command_chan.close()
500 for i in [writefd, readfd1, writefd2]: 500 for i in [writefd, readfd1, writefd2]:
501 try: 501 try:
502 os.close(i) 502 if i:
503 os.close(i)
503 except OSError: 504 except OSError:
504 pass 505 pass
505 sock.close() 506 sock.close()