Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/pyudev/__pycache__/

[FILE] core.cpython-310.pyc [ edit | delete | rename ]
[FILE] discover.cpython-310.pyc [ edit | delete | rename ]
[FILE] glib.cpython-310.pyc [ edit | delete | rename ]
[FILE] monitor.cpython-310.pyc [ edit | delete | rename ]
[FILE] pyqt4.cpython-310.pyc [ edit | delete | rename ]
[FILE] pyqt5.cpython-310.pyc [ edit | delete | rename ]
[FILE] pyside.cpython-310.pyc [ edit | delete | rename ]
[FILE] version.cpython-310.pyc [ edit | delete | rename ]
[FILE] wx.cpython-310.pyc [ edit | delete | rename ]
[FILE] _compat.cpython-310.pyc [ edit | delete | rename ]
[FILE] _errors.cpython-310.pyc [ edit | delete | rename ]
[FILE] _qt_base.cpython-310.pyc [ edit | delete | rename ]
[FILE] _util.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/pyudev/__pycache__/_errors.cpython-310.pyc

o

8g+^[�@sdZddlmZddlmZddlmZddlmZddlZddlmZeej	�Gdd	�d	e
��Zeej	�Gd
d�de��ZGdd
�d
e�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)z�
    pyudev.device._errors
    =====================

    Errors raised by Device methods.

    .. moduleauthor:: Sebastian Wiesner <lunaryorn@gmail.com>
�)�absolute_import)�division)�print_function)�unicode_literalsN)�
add_metaclassc@�eZdZdZdS)�DeviceErrorzP
    Any error raised when messing around w/ or trying to discover devices.
    N��__name__�
__module__�__qualname__�__doc__�rr�0/usr/lib/python3/dist-packages/pyudev/_errors.pyr$�rc@r)�DeviceNotFoundErrorz�
    An exception indicating that no :class:`Device` was found.

    .. versionchanged:: 0.5
       Rename from ``NoSuchDeviceError`` to its current name.
    Nr	rrrrr+rrc@s,eZdZdZdd�Zedd��Zdd�ZdS)	�DeviceNotFoundAtPathErrorzh
    A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was
    found at a given path.
    cCst�||�dS�N�r�__init__)�self�sys_pathrrrr;sz"DeviceNotFoundAtPathError.__init__cC�
|jdS)z<
        The path that caused this error as string.
        r��args�rrrrr>�
z"DeviceNotFoundAtPathError.sys_pathcCsd�|j�S)NzNo device at {0!r})�formatrrrrr�__str__Esz!DeviceNotFoundAtPathError.__str__N)r
rrr
r�propertyrrrrrrr5s
rc@r)�DeviceNotFoundByFileErrorzp
    A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was
    found from the given filename.
    Nr	rrrrr I�r c@r)�#DeviceNotFoundByInterfaceIndexErrorzw
    A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found
    from the given interface index.
    Nr	rrrrr"Pr!r"c@r)�!DeviceNotFoundByKernelDeviceErrorz�
    A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was found
    from the given kernel device string.

    The format of the kernel device string is defined in the
    systemd.journal-fields man pages.
    Nr	rrrrr#Wr!r#c@�8eZdZdZdd�Zedd��Zedd��Zdd	�Zd
S)�DeviceNotFoundByNameErrorzj
    A :exc:`DeviceNotFoundError` indicating that no :class:`Device` was
    found with a given name.
    cC�t�|||�dSrr)r�	subsystem�sys_namerrrrg�z"DeviceNotFoundByNameError.__init__cCr)zA
        The subsystem that caused this error as string.
        rrrrrrr'jrz#DeviceNotFoundByNameError.subsystemcCr)z@
        The sys name that caused this error as string.
        �rrrrrr(qrz"DeviceNotFoundByNameError.sys_namecC�
d�|�S)Nz+No device {0.sys_name!r} in {0.subsystem!r}�rrrrrrxs
z!DeviceNotFoundByNameError.__str__N)	r
rrr
rrr'r(rrrrrr%as

r%c@r$)�DeviceNotFoundByNumberErrorzs
    A :exc:`DeviceNotFoundError` indicating, that no :class:`Device` was found
    for a given device number.
    cCr&rr)r�typ�numberrrrr�r)z$DeviceNotFoundByNumberError.__init__cCr)zj
        The device type causing this error as string.  Either ``'char'`` or
        ``'block'``.
        rrrrrr�device_type�s
z'DeviceNotFoundByNumberError.device_typecCr)zB
        The device number causing this error as integer.
        r*rrrrr�
device_number�rz)DeviceNotFoundByNumberError.device_numbercCr+)Nz7No {0.device_type} device with number {0.device_number}r,rrrrr�s�z#DeviceNotFoundByNumberError.__str__N)	r
rrr
rrr0r1rrrrrr-|s

r-c@seZdZdZdd�ZdS)� DeviceNotFoundInEnvironmentErrorz�
    A :exc:`DeviceNotFoundError` indicating, that no :class:`Device` could
    be constructed from the process environment.
    cCsdS)NzNo device found in environmentrrrrrr�sz(DeviceNotFoundInEnvironmentError.__str__N)r
rrr
rrrrrr2�sr2c@s&eZdZdZdZddd�Zdd�ZdS)	�DeviceValueErrorz�
    Raised when a parameter has an unacceptable value.

    May also be raised when the parameter has an unacceptable type.
    z+value '%s' for parameter %s is unacceptableNcCs||_||_||_dS)z� Initializer.

            :param object value: the value
            :param str param: the parameter
            :param str msg: an explanatory message
        N)�_value�_param�_msg)r�value�param�msgrrrr�s
zDeviceValueError.__init__cCs6|jr|jd}||j|j|jfS|j|j|jfS)Nz: %s)r6�_FMT_STRr4r5)r�fmt_strrrrr�s
zDeviceValueError.__str__r)r
rrr
r:rrrrrrr3�s

r3)r
�
__future__rrrr�abc�sixr�ABCMeta�	Exceptionrrrr r"r#r%r-r2r3rrrr�<module>s&		


Upload File: