diff -r 36b9e48666ce -r 9352acb9366b src/pyams_zmq/socket.py --- a/src/pyams_zmq/socket.py Fri Jan 11 13:52:29 2019 +0100 +++ b/src/pyams_zmq/socket.py Thu Nov 28 19:19:25 2019 +0100 @@ -10,18 +10,19 @@ # FOR A PARTICULAR PURPOSE. # +"""PyAMS_zmq.socket module + +This module provides a few helpers which can be used to open a 0MQ socket and handle response. +""" + +import zmq + + __docformat__ = 'restructuredtext' -# import standard library - -# import interfaces - -# import packages -import zmq - - def zmq_socket(address, socket_type=zmq.REQ, linger=0, protocol='tcp', auth=None): + # pylint: disable=no-member """Get ØMQ socket auth is given as unicode 'username:password' string and automatically converted to bytes. @@ -41,5 +42,4 @@ poller.register(socket, flags) if poller.poll(timeout * 1000): return socket.recv_json() - else: - return [503, "Connection timeout"] + return [503, "Connection timeout"]