[oe-commits] [bitbake] 02/06: server/process: Fix ConnectionRefusedError tracebacks

git at git.openembedded.org git at git.openembedded.org
Thu Dec 6 10:51:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch 1.40
in repository bitbake.

commit c36803dba4fce8e6b16e437d702116a918ff718b
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 ed930c6..786877b 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()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list