) d Z ddlZddlZddlZddlmZ ddlmZ ddlZ n
# e
$ r dZ Y nw xY w e ZdZ G d de
Z G d d ZdS )
u pylve C-binding wrapper and related types.
This module wraps the pylve C extension (PyLve, PyLveError) and lives
outside lveapi deliberately: websiteisolation.* is imported by lveapi at
the top level, so any websiteisolation sub-module that needs PyLve or
PyLveError must not import from lveapi — that would form a cycle.
Placing these types here breaks the cycle; lveapi re-exports them for
backward compatibility.
N)ProcLve)uid_maxic e Zd ZdS )
PyLveErrorN)__name__
__module____qualname__ py/lve_utils/pylve_wrapper.pyr r # s Dr r c e Zd ZdZed Zd Zd Zd Ze dddfd Z
d
Zd Zd Z
d
Zd ZeefdZej d ZdS )PyLvezA
Wrapper for generate traceback with pretty descriptions
c Z t | t o| t j k o| dk S )Nr )
isinstanceinterrnoENOSYS)codes r _code_is_errorzPyLve._code_is_error+ s) $$$L%,)>L419Lr c t | j j r5d fdt D }d| d}nt }|S )N, c d g | ],}| d | dt | -S )_=)
startswithgetattr).0attrarg_vars r