403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/aptdaemon/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/aptdaemon/__pycache__/errors.cpython-310.pyc
o

T@3b$�@s6dZdZdZddlZddlmZddlZddlZddlZ	ej
jdkZGdd�dej
�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�dej
�ZGdd�de�ZGdd �d e�Zd!d"�Zd#d$�Zd(d&d'�ZdS))zException classesz%Sebastian Heinlein <devel@glatzor.de>)
�AptDaemonError�ForeignTransaction�InvalidMetaDataError�InvalidProxyError�RepositoryInvalidError�TransactionAlreadyRunning�TransactionCancelled�TransactionAlreadySimulating�TransactionFailed�TransactionRoleAlreadySet�NotAuthorizedError�convert_dbus_exception�get_native_exception�N)�wraps�c@s&eZdZdZdZd	dd�Zdd�ZdS)
rzInternal error of the aptdaemonzorg.debian.apt�cCs t|�}tj�||�||_dS�N)�_convert_unicode�dbus�
DBusException�__init__�_message)�self�message�r�2/usr/lib/python3/dist-packages/aptdaemon/errors.pyr/s
zAptDaemonError.__init__cCstrtj�|�S|j�d�S)z�Overwrite the DBusException method, since it calls
        Exception.__str__() internally which doesn't support unicode or
        or non-ascii encodings.�UTF-8)�PY3Krr�get_dbus_messager�encode�rrrrr4szAptDaemonError.get_dbus_messageN�r)�__name__�
__module__�__qualname__�__doc__�_dbus_error_namerrrrrrr)s

rc@�eZdZdZdZdS)r
�3Error if a transaction has already been configured.z(org.debian.apt.TransactionRoleAlreadySetN�r"r#r$r%r&rrrrr
>�r
c@r')rr(�(org.debian.apt.TransactionAlreadyRunningNr)rrrrrEr*rc@r')rzZError if a transaction should be simulated but a simulation is
    already processed.
    z+org.debian.apt.TransactionAlreadySimulatingNr)rrrrrLsrc@r')rz;Error if a transaction was initialized by a different user.r+Nr)rrrrrUr*rc@s.eZdZdZdZddd�Zdd�Zdd	�Zd
S)r	zDInternal error if a transaction could not be processed successfully.z org.debian.apt.TransactionFailedrcGsX|s|�dd�}tdd�|D��}t|�}||_||_||_t�|d|||f�dS)N�%z%%cSsg|]}t|��qSr)r)�.0�argrrr�
<listcomp>fsz.TransactionFailed.__init__.<locals>.<listcomp>�%s: %s)�replace�tupler�code�details�details_argsrr)rr3r4�argsrrrrbszTransactionFailed.__init__cCsdtj�|j�|jfS)NzTransaction failed: %s
%s)�	aptdaemon�enums�get_error_string_from_enumr3r4r rrr�__unicode__ms
��zTransactionFailed.__unicode__cCstr|��S|���d�S)Nzutf-8)rr:rr rrr�__str__rszTransactionFailed.__str__Nr!)r"r#r$r%r&rr:r;rrrrr	\s
r	c@r')rzInvalid meta data givenzorg.debian.apt.InvalidMetaDataNr)rrrrryr*rc@seZdZdZdZdd�ZdS)rzInvalid proxy givenzorg.debian.apt.InvalidProxycCst�|d|�dS)NzInvalidProxyError: %s)rr)r�proxyrrrr�szInvalidProxyError.__init__N)r"r#r$r%r&rrrrrr�src@r')rz.Internal error if a transaction was cancelled.z#org.debian.apt.TransactionCancelledNr)rrrrr�r*rc@r')rzThe added repository is invalidz org.debian.apt.RepositoryInvalidNr)rrrrr�r*rc@seZdZdS)�PolicyKitErrorN)r"r#r$rrrrr=�sr=c@seZdZdZdd�ZdS)rz-org.freedesktop.PolicyKit.Error.NotAuthorizedcCs&tj�|d||f�||_||_dS)Nr0)rrr�	action_id�subject)rr?r>rrrr�s
zNotAuthorizedError.__init__N)r"r#r$r&rrrrrr�src@seZdZdZdS)�AuthorizationFailedz&org.freedesktop.PolicyKit.Error.FailedN)r"r#r$r&rrrrr@�sr@cs4t���dd�\�}}}t����fdd��}|S)z�A decorator which maps a raised DBbus exception to a native one.

    This decorator requires introspection to the decorated function. So it
    cannot be used on any already decorated method.
    N�cs�z|d�Wn0ty6t|�}z��d�}||�Wnttfy'Yn
w�fdd�||<t|�}Yn	w�fdd�|d<z�|i|��WStjjyY}zt	|��d}~ww)N�
error_handlerc��t|��Sr�r
��err�rBrr�<lambda>���zIconvert_dbus_exception.<locals>._convert_dbus_exception.<locals>.<lambda>crCrrDrErGrrrH�rI)
�KeyError�list�index�
IndexError�
ValueErrorr2r�
exceptionsrr
)r6�kwargs�_argsrL�error��argnames�funcrGr�_convert_dbus_exception�s*
�����z7convert_dbus_exception.<locals>._convert_dbus_exception)�inspect�getfullargspecr)rU�varargsrP�defaultsrVrrSrr�srcCs�t|tj�s|S|��}|��}|tjkrt|�dd��S|tjkr*t|�dd��S|t	jkr7t	|�dd��St
ttt
ttttfD]
}||jkrN||�SqA|S)z�Map a DBus exception to a native one. This allows to make use of
    try/except on the client side without having to check for the error name.
    �:�)�
isinstancerr�
get_dbus_namerr	r&�splitr@rrr
rrrrrr)rR�	dbus_name�dbus_msg�	error_clsrrrr
�s&


�
�r
rcCs@trt|t�st||dd�}|Stst|t�st||dd�}|S)zAlways return an unicode.�ignore)�errors)rr]�str�unicode)�text�encodingrrrr�s�r)r)r%�
__author__�__all__rW�	functoolsr�sysr�aptdaemon.enumsr7�version_info�majorrrrr
rrrr	rrrrr=rr@rr
rrrrr�<module>s2	

!

Youez - 2016 - github.com/yon3zu
LinuXploit