AlkantarClanX12
Current Path : /usr/lib64/python3.6/site-packages/dbus/__pycache__/ |
Current File : //usr/lib64/python3.6/site-packages/dbus/__pycache__/exceptions.cpython-36.pyc |
3 iR�VB � @ s� d Z dZdd lmZ G d d� de�ZG dd� de�ZG dd� de�ZG d d� de�ZG dd� de�Z G dd� de�Z G dd� de�ZdS )zD-Bus exceptions.� DBusException�MissingErrorHandlerException�MissingReplyHandlerException�ValidationException�IntrospectionParserException�UnknownMethodException�NameExistsException� )�is_py3c @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) r Fc O sX |j dd �}|d k s$t| dd �d kr*|| _|rDtddj|j� � ��tj| f|�� d S )N�name�_dbus_error_namez1DBusException does not take keyword arguments: %sz, )�pop�getattrr � TypeError�join�keys� Exception�__init__)�self�args�kwargsr � r �"/usr/lib64/python3.6/exceptions.pyr - s zDBusException.__init__c C sF t | j�dkrt| j�}ndj| j�}| jdk r>d| j|f S |S dS )zReturn a unicode error� � Nz%s: %s)�lenr �unicoder r )r �sr r r �__unicode__6 s zDBusException.__unicode__c C s* t j| �}| jdk r"d| j|f S |S dS )zReturn a str errorNz%s: %s)r �__str__r )r r r r r r D s zDBusException.__str__c C sP t | j�dkr*trt| j�}q6t| j�}ndj| j�}t|t�rL|jdd�S |S )Nr r zutf-8�replace) r r r �strr r � isinstance�bytes�decode)r r r r r �get_dbus_messageL s zDBusException.get_dbus_messagec C s | j S )N)r )r r r r � get_dbus_nameZ s zDBusException.get_dbus_nameN) �__name__� __module__�__qualname__�include_tracebackr r r r$ r% r r r r r ! s c @ s e Zd ZdZdd� ZdS )r Tc C s t j| d� d S )Nz^error_handler not defined: if you define a reply_handler you must also define an error_handler)r r )r r r r r a s z%MissingErrorHandlerException.__init__N)r&