⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.177
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.9
/
site-packages
/
dasbus
/
__pycache__
/
View File Name :
error.cpython-39.opt-1.pyc
a װ_]" @ s d dl mZmZ d dlmZ g dZdd ZG dd deZG dd d ed Z G dd de Z G d d de ZG dd deZ dS ) )ABCMetaabstractmethod get_dbus_name)get_error_decorator DBusErrorAbstractErrorRule ErrorRuleDefaultErrorRuleErrorMapperc s d fdd }|S )a Generate a decorator for DBus errors. Create a function for decorating Python exception classes. The decorator will add a new rule to the given error mapper that will map the class to the specified error name. Definition of the decorator: .. code-block:: python decorator(error_name, namespace=()) The decorator accepts a name of the DBus error and optionally a namespace of the DBus name. The namespace will be used as a prefix of the DBus name. Usage: .. code-block:: python # Create an error mapper. error_mapper = ErrorMapper() # Create a decorator for DBus errors and use it to map # the class ExampleError to the name my.example.Error. dbus_error = create_error_decorator(error_mapper) @dbus_error("my.example.Error") class ExampleError(DBusError): pass :param error_mapper: an error mapper :return: a decorator c s$ t g | R fdd}|S )Nc s t| d | S )N)exception_type error_name)add_ruler )cls)error_mapperr r 0/usr/lib/python3.9/site-packages/dasbus/error.py decoratedI s z9get_error_decorator.
.decorator.
.decoratedr )r namespacer r )r r decoratorF s z&get_error_decorator.
.decorator)r r )r r r r r r # s #r c @ s e Zd ZdZdS )r zA default DBus error.N)__name__ __module____qualname____doc__r r r r r U s r c @ sD e Zd ZdZg Zedd Zedd Zedd Zedd Z d S )r z=Abstract rule for mapping a Python exception to a DBus error.c C s dS )zIs this rule matching the given exception type? :param exception_type: a type of the Python error :return: True or False Nr selfr r r r match_type_ s zAbstractErrorRule.match_typec C s dS )zGet a DBus name for the given exception type. :param exception_type: a type of the Python error :return: a name of the DBus error Nr r r r r get_nameh s zAbstractErrorRule.get_namec C s dS )zIs this rule matching the given DBus error? :param error_name: a name of the DBus error :return: True or False Nr r r r r r match_nameq s zAbstractErrorRule.match_namec C s dS )zGet an exception type of the given DBus error. param error_name: a name of the DBus error :return: a type of the Python error Nr r r r r get_typez s zAbstractErrorRule.get_typeN) r r r r __slots__r r r r r! r r r r r Z s r ) metaclassc @ s@ e Zd ZdZddgZdd Zdd Zdd Zd d Zdd Z dS )r z4Rule for mapping a Python exception to a DBus error._exception_type_error_namec C s || _ || _dS )aV Create a new error rule. The rule will return the Python type exception_type for the DBue error error_name. The rule will return the DBue name error_name for the Python type exception_type :param exception_type: a type of the Python error :param error_name: a name of the DBus error N)r$ r% )r r r r r r __init__ s zErrorRule.__init__c C s | j |kS )/Is this rule matching the given exception type?r$ r r r r r s zErrorRule.match_typec C s | j S z-Get a DBus name for the given exception type.r% r r r r r s zErrorRule.get_namec C s | j |kS )+Is this rule matching the given DBus error?r* r r r r r s zErrorRule.match_namec C s | j S z.Get an exception type of the given DBus error.r( r r r r r! s zErrorRule.get_typeN r r r r r" r&