diff options
author | 2017-02-01 21:13:23 +0200 | |
---|---|---|
committer | 2017-02-02 14:26:12 +0200 | |
commit | 781d71db20b0c5acbe940eff1b1ef2f1b765ce54 (patch) | |
tree | 444ef9944a789eaf7d51729d8e84f0b1ab70bda4 /scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py | |
parent | 7b39a77194c736194b40a40fdd19928b98310959 (diff) |
zmq os independent
Change-Id: Iaf5a782be4db26a979a7535454719e8e62b5969a
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py')
-rw-r--r-- | scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py b/scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py deleted file mode 100644 index 7cac725c..00000000 --- a/scripts/external_libs/pyzmq-14.5.0/python3/cel59/32bit/zmq/backend/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Import basic exposure of libzmq C API as a backend""" - -# Copyright (C) PyZMQ Developers -# Distributed under the terms of the Modified BSD License. - - -import os -import platform -import sys - -from zmq.utils.sixcerpt import reraise - -from .select import public_api, select_backend - -if 'PYZMQ_BACKEND' in os.environ: - backend = os.environ['PYZMQ_BACKEND'] - if backend in ('cython', 'cffi'): - backend = 'zmq.backend.%s' % backend - _ns = select_backend(backend) -else: - # default to cython, fallback to cffi - # (reverse on PyPy) - if platform.python_implementation() == 'PyPy': - first, second = ('zmq.backend.cffi', 'zmq.backend.cython') - else: - first, second = ('zmq.backend.cython', 'zmq.backend.cffi') - - try: - _ns = select_backend(first) - except Exception: - exc_info = sys.exc_info() - exc = exc_info[1] - try: - _ns = select_backend(second) - except ImportError: - # prevent 'During handling of the above exception...' on py3 - # can't use `raise ... from` on Python 2 - if hasattr(exc, '__cause__'): - exc.__cause__ = None - # raise the *first* error, not the fallback - reraise(*exc_info) - -globals().update(_ns) - -__all__ = public_api |