
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
UZ                 @   s   d dl Z d dlZd dlZd dlmZ yd dlmZ W n ek
rL   eZY nX G dd de	Z
dd Zdd	 Zed
krddddddddgZxleD ]dZede  yeedZW n> e
k
r   ej d Zededjeeejf  Y qX e  qW dS )    N)raise_with_tb)	ClassTypec               @   s   e Zd ZdZdS )GetMethodExceptionzException classN)__name__
__module____qualname____doc__ r	   r	   /usr/lib/python3.6/getMethod.pyr      s   r   c             C   sr   t jt j }|t j d }xR| D ]J}t|s4tdx |D ]}||kr:td| q:W |d |kr tdq W d S )N_zEmpty method componentz)Invalid character '%s' in the method namer   z6Method names should start with an alphabetic character)stringZascii_lowercaseZascii_uppercaseZdigitslenr   )methodNameCompsZalphaZallowedCharscompcr	   r	   r
   sanity   s    

r   c       
      C   sz  |j d| j d }t| x~tt|dd
D ]^}dj|d | }yt|}W n8 tk
rf   w.Y n$ tk
r   tt	d|  Y nX P q.W t	d|  |}|}xtdt|D ]}|| }||k  rt
||st	ddj|d | |f t||}qt
|ds$t	ddj|d |  t|d}	||	krVt	d	dj|d | |f t||}t|tkr| }qW |S )N.r      zCould not import module %szAction %s could not be importedzClass %s has no attribute %sZ__rhnexport__zClass %s is not RHN-compliantzClass %s does not export '%s')splitr   ranger   join
__import__ImportError	Exceptionr   r   hasattrgetattrtyper   )
Z
methodNameZ	baseClassr   indexZ
modulenameZactionsZfIndexZ	classNamer   Zexportr	   r	   r
   	getMethod.   sB    






r   __main__za.b.c.d.e.fza.b.c.d.e.foo.hza.b.c.d.e.g.hza.b.d.d.e.g.hza.b.d.d._e.g.hza.b.d.d.e_.g.hza.b.d.d.e-.g.hza.b.d.d..g.hz----Running method %s: ZActionsr   zError getting the method %s: %s )osr   sysZrhn.tbr   typesr   r   r   r   r   r   r   r   methodsmprintmethodexc_infoer   mapstrargsr	   r	   r	   r
   <module>
   s8   
=
