[oe-commits] [bitbake] 03/06: server/process: Fix ConnectionRefusedError tracebacks
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 6 10:51:45 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.38
in repository bitbake.
commit 0d0d8558d753ab3723325246c7d6c11e93cd18b8
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Nov 28 16:30:12 2018 +0000
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 at linuxfoundation.org>
---
lib/bb/server/process.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 028138a..922d886 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -488,7 +488,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()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list