| Current File : /home/mmdealscpanel/yummmdeals.com/_ctypeslib.zip |
PK 05[8� � __init__.pynu �[��� # -*- coding: utf-8 -*-
# Copyright (C) 2015 mulhern <amulhern@redhat.com>
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
pyudev._ctypeslib
=================
Wrappers for libraries.
.. moduleauthor:: mulhern <amulhern@redhat.com>
"""
from . import libc
from . import libudev
PK 05[E�d(m m / __pycache__/_errorcheckers.cpython-36.opt-1.pycnu �[��� 3
u1�W� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlm Z ej
eeje
ejeiZdd � Zd
d� Zdd
� Zdd� ZdS )zt
pyudev._ctypeslib._errorcheckers
================================
Error checkers for ctypes wrappers.
� )�absolute_import)�division)�print_function)�unicode_literalsN)� get_errnoc C s2 t j| �}tj| �}|dk r$||�S t| |�S dS )z�Create an exception from ``errnum``.
``errnum`` is an integral error number.
Return an exception object appropriate to ``errnum``.
N)�ERRNO_EXCEPTIONS�get�os�strerror�EnvironmentError)�errnumZ exceptionZerrorstr� r
�$/usr/lib/python3.6/_errorcheckers.py�exception_from_errno+ s
r c G s | dk r| }t |��n| S dS )a� Error checker for funtions, which return negative error codes.
If ``result`` is smaller than ``0``, it is interpreted as negative error
code, and an appropriate exception is raised:
- ``-ENOMEM`` raises a :exc:`~exceptions.MemoryError`
- ``-EOVERFLOW`` raises a :exc:`~exceptions.OverflowError`
- all other error codes raise :exc:`~exceptions.EnvironmentError`
If result is greater or equal to ``0``, it is returned unchanged.
r N)r )�result�func�argsr r
r
r �check_negative_errorcode; s
r c G s"