From e7eaeadaeeee31b30ae4d8e9d0377d839366f392 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 20 May 2021 09:24:40 -0700 Subject: [PATCH] Remove unnecessary return statements in Python sockets error handler --- src/bindings/python/sockets.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/bindings/python/sockets.py b/src/bindings/python/sockets.py index 5f51591..2bd6fc0 100755 --- a/src/bindings/python/sockets.py +++ b/src/bindings/python/sockets.py @@ -8,25 +8,18 @@ def handle_error(err): if err == libzt.ZTS_ERR_SOCKET: if errno() == libzt.ZTS_EAGAIN: raise BlockingIOError() - return if errno() == libzt.ZTS_EINPROGRESS: raise BlockingIOError() - return if errno() == libzt.ZTS_EALREADY: raise BlockingIOError() - return if errno() == libzt.ZTS_ECONNABORTED: raise ConnectionAbortedError() - return if errno() == libzt.ZTS_ECONNREFUSED: raise ConnectionRefusedError() - return if errno() == libzt.ZTS_ECONNRESET: raise ConnectionResetError() - return if errno() == libzt.ZTS_ETIMEDOUT: raise TimeoutError() - return raise Exception("ZTS_ERR_SOCKET (" + str(err) + ")") if err == libzt.ZTS_ERR_SERVICE: raise Exception("ZTS_ERR_SERVICE (" + str(err) + ")")