| Server IP : 185.143.234.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/up2date_client/__pycache__/ |
Upload File : |
a
c8h� � @ s� d dl Z d dlZd dlZd dlmZ zd dlmZ W n eyJ eZY n0 G dd� de �Z
dd� Zdd � Ze
d
kr�g d�ZeD ]bZede � zeed
�ZW n< e
y� e�� d Zeded�eeej��f � Y q�0 e� q�dS )� N)�
raise_with_tb)� ClassTypec @ s e Zd ZdZdS )�GetMethodExceptionzException classN)�__name__�
__module__�__qualname__�__doc__� r r �</usr/lib/python3.9/site-packages/up2date_client/getMethod.pyr s r c C sj t jt j }|t j d }| D ]F}t|�s2td��|D ]}||vr6td| ��q6|d |vrtd��qd S )N�_zEmpty method componentz)Invalid character '%s' in the method namer z6Method names should start with an alphabetic character)�stringZascii_lowercaseZascii_uppercase�digits�lenr )�methodNameCompsZalphaZallowedChars�comp�cr r r
�sanity s ��r c
C sp |� d�| � d� }t|� tt|�dd�D ]^}d�|d |� �}zt|�}W n6 tyd Y q,Y n" ty� tt d| �� Y n0 q�q,t d| ��|}|}tdt|��D ]�}|| }||k r�t
||�s�t dd�|d |� �|f ��t||�}q�t
|d��st d d�|d |� � ��t|d�} || v�rNt d
d�|d |� �|f ��t||�}t|�t
u r�|� }q�|S )N�.r ���zCould not import module %szAction %s could not be imported� zClass %s has no attribute %sZ
__rhnexport__zClass %s is not RHN-compliantzClass %s does not export '%s')�splitr �ranger �join�
__import__�ImportError� Exceptionr r �hasattr�getattr�typer )
Z
methodNameZ baseClassr �indexZ
modulename�actionsZfIndexZ classNamer Zexportr r r
� getMethod. sH
�
�
�
r! �__main__)za.b.c.d.e.fza.b.c.d.e.foo.hz
a.b.c.d.e.g.hz
a.b.d.d.e.g.hza.b.d.d._e.g.hza.b.d.d.e_.g.hza.b.d.d.e-.g.hza.b.d.d..g.hz----Running method %s: ZActionsr zError getting the method %s: %s� )�osr �sysZrhn.tbr �typesr r r r r r r! r �methods�m�print�method�exc_info�er �map�str�argsr r r r
�<module>
s,
=�