error.py 311 B

12345678910111213141516
  1. """zmq error functions"""
  2. # Copyright (C) PyZMQ Developers
  3. # Distributed under the terms of the Modified BSD License.
  4. from ._cffi import ffi
  5. from ._cffi import lib as C
  6. def strerror(errno):
  7. return ffi.string(C.zmq_strerror(errno)).decode()
  8. zmq_errno = C.zmq_errno
  9. __all__ = ['strerror', 'zmq_errno']