;๒
^ลด<c           @   s๓   d  k  Z  d  k Z d k l Z l Z d e f d     YZ d   Z d   Z e	 d j o d d d	 d
 d d d d g Z
 xt e
 D]h Z d e GHy e e d d  Z Wn9 e j
 o- Z d e e i e e e i   f GHq Xe   q Wn d  S(   N(   s   ListTypes	   ClassTypes   GetMethodExceptionc           B   s   t  Z d  Z RS(   s   Exception class(   s   __name__s
   __module__s   __doc__(    (    (    s*   /usr/share/rhn/up2date_client/getMethod.pys   GetMethodException   s    c         C   sง   t  i t  i } | t  i d } x |  D]w } t |  o t	 d   n x/ | D]' } | | j o t	 d |   qS qS W| d | j o t	 d   q( q( Wd  S(   Ns   _s   Empty method components)   Invalid character '%s' in the method namei    s6   Method names should start with an alphabetic character(   s   strings	   lowercases	   uppercases   alphas   digitss   allowedCharss   methodNameCompss   comps   lens   GetMethodExceptions   c(   s   methodNameCompss   cs   comps   allowedCharss   alpha(    (    s*   /usr/share/rhn/up2date_client/getMethod.pys   sanity   s      c         C   sr  t  i | d  t  i |  d  } t |  | }
 xง t t	 |   D] } | | } d |
 | f }
 t i i |
  o qE n xI d d d g D]( } t i i d |
 | f  o Pq q Wt d |    PqE Wt d   | d	 }	 t  i | |	  d  } y t |  } Wn# t j
 o t d
 |   n X| } x/t d	 t	 |   D]} | | } | |	 j  oQ t | |  o* t d t  i | |  d  | f   n t | |  } qNn t | d  o$ t d t  i | |  d    n t | d  } | | j o* t d t  i | |  d  | f   n t | |  } t |  t j o |   } qNqNW| Sd  S(   Ns   .s   %s/%ss   pys   pycs   pyos   %s.%ss   Action %s could not be founds
   Very wrongi   s   Could not import module %ss   Class %s has no attribute %ss   __rhnexport__s   Class %s is not RHN-compliants   Class %s does not export '%s'(   s   strings   splits	   baseClasss
   methodNames   methodNameCompss   sanitys   abspaths   paths   ranges   lens   indexs   comps   oss   isdirs	   extensions   isfiles   GetMethodExceptions   fIndexs   joins
   modulenames
   __import__s   actionss   ImportErrors	   classNames   hasattrs   getattrs   exports   types	   ClassType(   s
   methodNames   abspaths	   baseClasss
   modulenames   actionss	   classNames   exports   indexs   comps   fIndexs   paths	   extensions   methodNameComps(    (    s*   /usr/share/rhn/up2date_client/getMethod.pys	   getMethod*   sP    "
 
 	
 
*$*s   __main__s   a.b.c.d.e.fs   a.b.c.d.e.foo.hs   a.b.c.d.e.g.hs   a.b.d.d.e.g.hs   a.b.d.d._e.g.hs   a.b.d.d.e_.g.hs   a.b.d.d.e-.g.hs   a.b.d.d..g.hs   ----Running method %s: s   .s   Actionss   Error getting the method %s: %s(   s   oss   strings   typess   ListTypes	   ClassTypes	   Exceptions   GetMethodExceptions   sanitys	   getMethods   __name__s   methodss   ms   methods   es   joins   maps   strs   args(   s   sanitys   es   strings	   ClassTypes   ms	   getMethods   GetMethodExceptions   ListTypes   oss   methods   methods(    (    s*   /usr/share/rhn/up2date_client/getMethod.pys   ?   s   				J 	)