;ò
øÐ3@c           @   si   d  k  Z  d  k Z d k l Z d  k Z d  k Z d e f d „  ƒ  YZ e a d a	 d „  Z
 d „  Z d  S(   N(   s   SourcesConfigFiles   AppletSourcesConfigFilec           B   s#   t  Z d  Z e d „ Z d „  Z RS(   sž   The applet source parser reuses the up2date parser except it
       avoid using the default configuration which may not be
       accessible as a normal user.c         C   s7   g  |  _ | |  _ t |  _ |  i o |  i ƒ  n d  S(   N(   s   selfs   reposs   filenames   fileNames   Nones   cfgs   load(   s   selfs   filename(    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys   __init__   s
    			
c         C   s[   y t  i | ƒ \ } } Wn d GHd | GHd  Sn X|  i i h  d d <d | <ƒ d  S(   Ns(   Error parsing /etc/sysconfig/rhn/up2dates   at line: %ss   types   up2dates   url(   s   strings   splits   lines   tmps   urls   selfs   reposs   append(   s   selfs   lines   tmps   url(    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys   parseUp2date   s    	(   s   __name__s
   __module__s   __doc__s   Nones   __init__s   parseUp2date(    (    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys   AppletSourcesConfigFile   s    i    c          C   s•   d } yQ t i | ƒ d }  t o
 t |  j o t Sn t d | ƒ } | i a |  a Wn3 t	 i
 d d ƒ h  d d <d d <g a n Xt Sd	 S(
   sy   Load the RHN source definition file /etc/sysconfig/rhn/sources
       and returns a preparsed set of source repositories.s   /etc/sysconfig/rhn/sourcesi   s   filenames5   Failed to read sources from %s, assuming up2date onlys   urls   defaults   types   up2dateN(   s   filenames   oss   stats   stamps   sourcess   __sources_timestamps   AppletSourcesConfigFiles   scfgs   reposs	   rhn_utilss	   log_debug(   s   stamps   filenames   scfg(    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys
   getSources*   s       	
c          C   sU   d } y, t i | ƒ d }  t |  j o d Sn Wn t i d d ƒ n Xd Sd S(   s{   Check if the RHN source definition file /etc/sysconfig/rhn/sources
       have changed since the last call to getSources().s   /etc/sysconfig/rhn/sourcesi   i    s   Failed to stat %si   N(   s   filenames   oss   stats   stamps   __sources_timestamps	   rhn_utilss	   log_debug(   s   stamps   filename(    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys   changedSources=   s      (   s   strings   oss   sourcesConfigs   SourcesConfigFiles   urlparses	   rhn_utilss   AppletSourcesConfigFiles   Nones   sourcess   __sources_timestamps
   getSourcess   changedSources(   s
   getSourcess   strings   changedSourcess   AppletSourcesConfigFiles   SourcesConfigFiles   urlparses   oss	   rhn_utils(    (    s-   /data/usr-share/rhn/rhn_applet/rhn_sources.pys   ?   s   				  	