aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/unix/tuntap.h
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-09-21 03:53:22 +0000
committerDave Barach <openvpp@barachs.net>2019-09-21 13:47:32 +0000
commit4c737a7e54f573be82ea05782ccf353195d03ebd (patch)
tree1114b61e56f72e8f8a77476e9b40cdcf6885f2f9 /src/vnet/unix/tuntap.h
parent0dda2a37babda8bcc45a7f180513f92aa2da729e (diff)
tests: fix test-checkstyle to check plugin tests
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I93eb0ae4338247fa2479f8e419483d1593436dc7
Diffstat (limited to 'src/vnet/unix/tuntap.h')
0 files changed, 0 insertions, 0 deletions
r: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
"""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