
0Zc           @   si  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z e  j d d d d d f k rd  d l Z n d  d l Z y e Wn! e k
 rHd  d l m Z n Xd  d l Z y$ d  d l m Z d  d l m Z Wn1 e  k
 rd  d	 l m! Z d  d
 l m" Z n Xd  d l# m$ Z$ d  d l% m% Z% y d  d l& Z& e' Z( Wn e  k
 re) Z( n Xe$ j$ Z* d Z+ d e* Z, d Z- e' Z. d Z/ d Z0 d Z1 d Z2 d Z3 d Z4 d Z5 d Z6 d Z7 d Z8 d Z9 d Z: d Z; d Z< d Z= d Z> d  Z? d! Z@ d" ZA d# ZB d$ ZC d% ZD e5 d&  ZE d'   ZF d(   ZG d) d*  ZH d+   ZI eJ d,  ZK d-   ZL d.   ZM d/   ZN eJ aO eJ d0  ZP d1   ZQ d2   ZR d3   ZS d4   ZT d5   ZU d6 eV f d7     YZW d8   ZX d9 eY f d:     YZZ eZ e@ d; e- f  Z[ d< eV f d=     YZ\ d>   Z] d? eV f d@     YZ^ dA eV f dB     YZ_ dC eV f dD     YZ` e' eJ dE  Za dF eV f dG     YZb dH   Zc dI eY f dJ     YZd dK   Ze dL   Zf dM   Zg dN   Zh dO   Zi dP   Zj d S(Q   iNi   i   t   finali    (   t   Set(   t   CSafeLoader(   t   CSafeDumper(   t
   SafeLoader(   t
   SafeDumper(   t   version(   t   urlparset   2s   Uptrack/s   ksplice-support_ww@oracle.coms   /etc/uptrack/uptrack.confs   /var/lib/uptrack/uuids   /var/lib/uptrack/serials   /var/cache/uptracks   /var/run/ksplice-ems!   /var/run/ksplice-em/kernel_statuss-   https://updates.ksplice.com/update-repositorys!   /var/lib/uptrack/effective_kerneli   i
   i   i   i   i   i   i   i   i   i   i   i   i   c         C   sM   y4 |  t  k r t St |   d } t j d |  SWn t k
 rH t SXd  S(   Ni   s$   .*\.(ksplice|oracle)\.com(:[0-9]+)?$(   t   UPDATE_REPO_URLt   TrueR   t   ret   matcht	   Exceptiont   False(   t   urlt   netloc(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   server_is_oraclep   s    c         C   sC   y t  j |   Wn+ t k
 r> } | j t j k r?   q? n Xd S(   s   
    Essentially, mkdir -p
    N(   t   ost   makedirst   OSErrort   errnot   EEXIST(   t   dirt   e(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   mkdirp}   s
    c         C   s2   t  |  d  } z | j |  Wd  | j   Xd  S(   Nt   w(   t   opent   writet   close(   t   patht   datat   fh(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt
   write_file   s    t   rc         C   s/   t  |  |  } z | j   SWd  | j   Xd  S(   N(   R   t   readR   (   R   t   modeR    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   read_file   s    c         K   s   t  j |  d t | S(   Nt   Loader(   t   yamlt   loadt   yaml_loader(   t   streamt   kwargs(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   yaml_load   s    c         K   s   t  j |  | d t | S(   Nt   Dumper(   R'   t   dumpt   yaml_dumper(   t   objR*   R+   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   yaml_dump   s    c         C   sl   |  j  | |  rd y |  j | |  SWqh t k
 r` } d | t | | f } t d |   qh Xn | Sd S(   s   
    Return the value of a boolean config option, or `default` if no value is
    given.

    Raise a ResultException on invalid (non-boolean) values.
    sa   Unable to read %s setting from %s.
%s
Please check that %s is set to 'yes' or 'no' and try again.i   N(   t
   has_optiont
   getbooleant
   ValueErrort   UPTRACK_CONFIG_FILEt   ResultException(   t   configt   sectiont   optiont   defaultR   t   msg(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getConfigBooleanOrDie   s    c         C   s   y t  j d d d d g d t  j d t  j } | j   d j   } | j d k rY | St  j d d d d g d t  j d t  j } | j   d j   } | j d k r | SWn: t  j t f k
 r t j	 d	  t j	 t
 j    n X|  S(
   Nt   setarcht   linux64t   unames   -mt   stdoutt   stderri    t   x86_64s+   Unable to determine the kernel architecture(   t
   subprocesst   Popent   PIPEt   communicatet   stript
   returncodet   CalledProcessErrorR   t   loggingt   debugt	   tracebackt
   format_exc(   t   userarcht   pt   out(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   queryRealArch   s    !!c          C   sm   t  j   \ }  } } } } t |  } | d k r< d } n  | d k rQ d } n  |  | | | | | f } | S(   s;  
    Gets the uname, but lies a little, since the arch field is
    actually governed by 'personality' and not the real architecture.

    Note that this returns both the architecture Uptrack is being run
    under, as well as the architecture of the kernel itself (i.e.
    'uname -m' and 'linux64 uname -m').
    t   i686t   i586t   i486t   i386(   RR   RS   RT   (   RR   RS   RT   (   R   R?   RQ   (   t   sysnamet   hostnamet   releaseR   RN   t   archR?   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getUname   s    	 	 	c         C   sU  t  d	 k rQt j   a  t  j t j t  t  j t j d  t  j t j d  t  j t j d  t  j t j	 d  |  r |  j
 r x= |  j
 D] \ } } t  j | |  q Wn t  j t j d  t  j t j d  t  j t j d  |  r|  j d	 k	 rt  j t j |  j  n  |  rQt |  d d  d k rQt  j t j d  qQn  d	 S(
   s6   Initialize the shared cURL object for getCurl().

    i   i   t    s&   /usr/share/uptrack/ca-certificates.crti   iX  t   verbosei    N(   t   __curlt   Nonet   pycurlt   Curlt   setoptt	   USERAGENTt   OPT_FILETIMEt   FOLLOWLOCATIONt	   MAXREDIRSt   ENCODINGt   ssl_ca_certst   CAINFOt   CONNECTTIMEOUTt   TIMEOUTt   proxyt   PROXYt   getattrt   VERBOSE(   R7   t   typet   value(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   initCurl   s"    c           C   s   t  S(   s6  Return a shared cURL object for use by Uptrack.

    For performance, this always returns the same cURL object, in
    order to allow libcURL to reuse connections as much as
    possible. In order for this to work properly, callers should
    always explicitly set the HTTP method they desire before calling
    `.perform()`, and should reset any other unusual properties they
    set on the cURL object to a reasonable default value when they're
    done.

    Needless to say, this is not thread-safe.

    You must call initCurl() before using this function.
    (   R]   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getCurl   s    c      	   C   s   d   } d   } x |  s! | r xs |  r; |  d j    sR | r | d j    r t | |  d   | | d    } | r | S|  d }  | d } q$ Wt j d |   j   \ } }  t j d |  j   \ } } t | |  | |   } | r | Sq Wd S(   s,   Emulates dpkg's verrevcmp() in lib/vercmp.c.c         S   sN   |  d k r d S|  j    r  d S|  s* d S|  j   r@ t |   St |   d S(   Nt   ~ii    i   (   t   isdigitt   isalphat   ord(   t   x(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   order  s        
c         S   s   |  s
 d St  |   S(   Ni    (   t   int(   t   s(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   num	  s     i    i   s   ^([0-9]*)(.*)(   Rt   t   cmpR   R   t   groups(   t   at   bRx   R{   t   dt   ant   bn(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   verrevcmp   s    		1# 
  c         C   s   d |  k r3 |  j  d d  \ } } t |  } n d } |  } d | k rf | j  d d  \ } } n | d } } | | | f S(   s3   Emulates dpkg's parseversion(), in lib/parsehelp.c.t   :i   i    t   -R[   (   t   splitRy   (   t   vt   epochstrt   restt   epochR   t   revision(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   parseversion  s    c         C   sU   t  |   \ } } } t  |  \ } } } t | |  pT t | |  pT t | |  S(   s?   Emulates dpkg --compare-versions.  Returns -1, 0, 1 like cmp().(   R   R|   R   (   R~   R   t   aet   avt   art   bet   bvt   br(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   compareversions)  s    c         C   s   t  |  j | j  S(   N(   R|   Rx   (   R~   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   cmp_order/  s    t   Resultc           B   s   e  Z d  d d  Z RS(   i    R[   c         C   s^   | |  _  | |  _ g  |  _ g  |  _ d  |  _ d  |  _ d  |  _ d  |  _ t	 |  _
 d  |  _ d  S(   N(   t   codet   messaget	   succeededt   failedR^   RK   t   alertt   desupportedt   tray_icon_errorR   t	   newkernelt   uptrack_log(   t   selfR   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   __init__3  s    									(   t   __name__t
   __module__R   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR   2  s   c         C   s  | d t  j t  j t  j g k r/ d t } n | d t  j k rX d |  j t f } n | d t  j k r d |  j t f } n` | d t  j	 k r d } t
 |  j  r | d t f 7} q | d t t f 7} n d t f } t j |  d	 | d
 d } t t |  S(   Ni    s-  Could not connect to the Ksplice Uptrack server. A network connection is needed to ensure you have the latest list of updates to install. Please check your Internet connection and try again. If this computer does not have direct access to the Internet, you will need to configure an https proxy in %s.s   Could not resolve your proxy server (%s) while trying to connect to the Ksplice Uptrack server.  You should check that this machine can directly connect to the proxy server configured in %s.sb   Malformed URL <%s> for Uptrack server.  Please correct the value of Network.update_repo_url in %s.s?   Could not verify the Ksplice Uptrack server's SSL certificate. sh   Check your network configuration, and contact %s for assistance if you are unable to resolve this error.s   You may need to update ssl_ca_cert_file or ssl_ca_cert_dir in %s with the path to an appropriate CA. Please consult %s for assistance if you are unable to resolve this error.s   Unexpected error communicating with the Ksplice Uptrack server. Please check your network connection and try again. If this error re-occurs, e-mail %s. s   

(Network error: i   t   )(   R_   t   E_COULDNT_RESOLVE_HOSTt   E_COULDNT_CONNECTt   E_OPERATION_TIMEOUTEDR5   t   E_COULDNT_RESOLVE_PROXYRk   t   E_URL_MALFORMATt
   remoteroott   E_SSL_CACERTR   t	   BUG_EMAILt   textwrapt   fillR   t   ERROR_NO_NETWORK(   R7   R   R;   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   resultFromPycurl?  s,    

R6   c           B   s   e  Z d    Z RS(   c         C   s)   t  j |  | |  t | |  |  _ d  S(   N(   R   R   R   t   result(   R   R   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR   i  s    (   R   R   R   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR6   h  s   s   The Ksplice Uptrack service has experienced a transient error. Please
wait a few minutes and try again. If this error persists, please
contact %s for assistance.t   ActionResultc           B   s   e  Z d    Z d   Z RS(   c         C   sv   d |  _  d |  _ | |  _ | |  _ d  |  _ d  |  _ d  |  _ g  |  _ g  |  _	 t
 |  _ d |  _ | j   |  _ d  S(   Ni    R[   (   R   R   t   updatet   commandR^   t
   abort_codet   stack_check_processest   nomatch_modulest   locked_modulest   usedby_modulesR   t   depmod_neededRK   t   getCoreVersiont   core_version(   R   R   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR   u  s    											c         C   s   i  } |  j  | d <|  j j | d <|  j j | d <|  j | d <|  j | d <|  j | d <|  j | d <|  j | d <|  j	 | d	 <|  j
 | d
 <| S(   Nt   Commandt   IDt   Namet   Messaget   Aborts   Core Versions   Stack Checks   Nonmatching Moduless   Locked Moduless   UsedBy Modules(   R   R   t   idt   nameR   R   R   R   R   R   R   (   R   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   asDict  s    (   R   R   R   R   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR   t  s   	c          C   s;   t  j   \ }  } } } } i |  d 6| d 6| d 6| d 6S(   Nt   Sysnamet   Releaset   Versiont   UserArchitecture(   R   R?   (   RV   t   _RX   R   RN   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getKernelDict  s
    
t   Statusc           B   s   e  Z d    Z d   Z d   Z d d  Z e e  Z e d  Z	 d   Z
 e d  Z d   Z d   Z d	   Z d
   Z d   Z RS(   c         C   sm   | |  _  t j j | d  |  _ t j j | d  |  _ t j j | d  |  _ t j j | d  |  _ d  S(   Nt   statust   resultst   upgrade_plans   results.server-stamp(   t	   statusdirR   R   t   joint	   statusloct
   resultsloct
   upgradeloct   stamploc(   R   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     s
    	c         C   so  y) t  |  j  } t |  } | j   Wn t k
 r} | j t j k r t j j	 d  rh d } n d } i  } i  | d <d | d d <d | | d d <| S| j t j
 k r d  Si  } i  | d <d | d d <d	 |  j t j | j  f | d d <| Sn Xy6 t  |  j  } t |  } | j   | j |  Wn t k
 r} | j t j
 k rlg  | d
 <qg  | d
 <i  | d <d | d d <d |  j t j | j  f | d d <| Sn Xy6 t  |  j  } t |  } | j   | j |  Wnu t k
 rj} i  | d <| j t j
 k r2d | d d <qkd | d d <d |  j t j | j  f | d d <n X| S(   Ns   /etc/debian_versions   sudo adduser $USER adms(   gpasswd -a <your username> adm (as root)R   i   t   Codes   Permission denied reading the status file.  You need to be in the adm group in order to use the the Ksplice Uptrack Manager; you can add yourself by running

%s

You will need to log out and back in for this change to take effect.R   s#   Error reading status file (%s): %s
t   Plani   s$   Error reading upgrade plan (%s): %s
i    i   s$   Error reading results file (%s): %s
(   R   R   R,   R   t   IOErrorR   t   EACCESR   R   t   existst   ENOENTR^   t   strerrorR   R   R   (   R   t   fR   R   t   recommendationt   upgradeR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt
   readStatus  sd    	

$


$

(c      	   C   sp   t  j j |  } t  j j |  s4 t  j |  n  t | d  } t | | d d d t d t | j   d  S(   NR   R   i   t   explicit_startt   explicit_end(   i   i   (	   R   R   t   dirnamet   isdirR   R   R1   R
   R   (   R   t   contentst   fileR   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt
   _writeFile  s    c   	      C   sA  i  | d <t  |  d d   | d d <t  |  d d   | d d <|  j | d d <|  j | d d <|  j r} |  j | d d <n  |  j r |  j | d d	 <n  |  j | d d
 <t | d d <y" t d  j	   d | d d <Wn2 t
 k
 rt j t j    d | d d <n Xy6 t t t j j |  j d   j    | d d <WnW t
 k
 r} | j t j k r{d | d d <qd | d d <t j t j    n Xt   rt | d d <n  |  j | d d <d |  j k r|  j d | d d <n |  j d | d d <i  | d d <t  |  d t  | d d d <t  |  d d   d  k	 rit  |  d  | d d d <n  t  |  d t  | d d d <t   | d d <t  |  d  d   } | d  k	 r| | d d! <n  i  | d d" <x d4 d5 g D] \ } } i  } y t t j |   | d' <Wn t  k
 r.d6 | d' <n Xy t j! |  | d( <Wn t  k
 rcd) | d( <n X| | d d" | <qWi  | d* <|  j" | d* d+ <|  j# | d* d, <|  j$ | d* d- <|  j% | d* d. <|  j& | d* d/ <|  j' r|  j' | d0 <n |  j( | d1 <| d  k	 r=| j)   } | d  k	 r0| d2 } n  | | d3 <n  d  S(7   Nt   ClientRW   t   Hostnamet   fullhostnamet   FullHostnamet   Keyt   UUIDt   NewUUIDt   OldUUIDt   CPUInfot   UptrackVersions   /proc/uptimei    t   Uptimeit   reboots_savedt   RebootsSavedt
   VirtualBoxt   VMInfot   IPt   LocalIPt   Errort   LocalIP_errort   Configt   cron_autoinstallt   Autoinstallt   initt   Initt   cront   Cront   MmapMinAddrt   serial_statt
   SerialStatt   Toolst   Depmods   /sbin/depmodt   Modprobes   /sbin/modprobet   Statt   LinkR[   t   KernelR   R   R   t   ArchitectureR   t   RunUUIDt   RunUUID_errort   PackageVersiont   ClientEffectiveKernel(   R  s   /sbin/depmod(   R  s   /sbin/modprobe(    (*   Rm   R^   t	   accesskeyt   uuidt   newuuidt   olduuidt   cpuinfot   __version__R%   R   R   RJ   RK   RL   RM   t   lenR   R   R   R   t	   localroott	   readlinesR   R   t   inVirtualBoxR
   t   vminfot   localipR   t   getMmapMinAddrt   tuplet   statR   t   readlinkRV   RX   R   RY   RN   t   run_uuidt   run_uuid_errort   getEffective(	   R7   R   t   local_statusR   R  t   keyR   t   valt	   effective(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   addIdentity  s    
		"!	
	c   
      C   s  i  } t  | d <t j j   | d <| sE |  j | j | d | n  i  | d <g  | d d <t |  } | j t  xC | D]; } i  } | j | d <| j	 | d <| d d j
 |  q} W| | d <| r t }	 n	 |  j }	 t t j j |	   |  j | |	  d  S(	   Ns   Status format versiont   TimeR!  t   Updatest	   InstalledR   R   s
   New client(   t   STATUS_FILE_FORMAT_VERSIONt   datetimet   utcnowR%  t   client_configt   listt   sortR   R   R   t   appendt   UPTRACK_EM_STATUSR   R   R   R   R   R   (
   R   t   localt
   new_clientt   installed_updatest   publicR   t   installed_sortedt   uR   t   outfile(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeStatus8  s(    


		c         C   s  i  } t  | d <t j j   | d <|  j | j | d | i  | d <g  | d d <x2 | j D]' } | j   } | d d j |  q^ Wg  | d d <x2 | j D]' } | j   } | d d j |  q W| j	 | d d <| j
 | d d <| j d  k	 r| j | d	 <n  | j d  k	 r,| j | d
 <n  | j d  k	 rO| j | d d <n  | j d  k	 rr| j | d d <n  | j d  k	 r| j | d d <n  | j rt | d d <n  | j j rt | d d <n  |  j | |  j  d  S(   Ns   Results format versionR&  R!  R   t	   Succeededt   FailedR   R   t   Debugt
   UptrackLogt   Alertt   Desupportedt   TrayIconErrors
   New Kernelt   Uninstalled(   R)  R*  R+  R%  R,  R   R   R/  R   R   R   RK   R^   R   R   R   R   R   R
   t	   uninstallR   R   (   R   R1  t   resR   t   actionR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeResultsQ  s<    

	c         C   s   i  } t  | | j   d <t j j   | d <g  | D]; } t g  d
 D]" } | | k rD | | | f ^ qD  ^ q4 | d <| r t j j t d | d	  } n t j j |  j	 | d	  } |  j
 | |  d  S(   Ns    plan format versionR&  R   R   R   t   EffectiveKernelR   t   kernel_t   _plan(   s   Commands   IDs   NameRE  (   R)  t   titleR*  R+  t   dictR   R   R   t   UPTRACK_EM_STATUS_DIRR   R   (   R   R   t   actionsR4  t   plant   actt   kR7  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt	   writePlanr  s    I c         C   s*   |  j  d |  |  j  d | d t d  S(   NR   R4  (   RO  R
   (   R   RL  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeUpgradePlan  s    c         C   s   |  j  d |  d  S(   NR   (   RO  (   R   RL  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeInitPlan  s    c         C   s   |  j  d |  d  S(   Nt   remove(   RO  (   R   RL  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeRemovePlan  s    c         C   s2   i | d 6t    d 6| d 6} |  j | t  d  S(   NRE  t   OriginalKernelR(  (   R   R   t   UPTRACK_EFFECTIVE_KERNEL_FILE(   R   R$  t   idsRP   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeEffectiveKernel  s    


c         C   s  y t  |  j  } Wn t k
 r' d  SXt |  d } y) t t  |  j   } | | k r` d  SWn t t j t f k
 r n Xt j	 | j
 t j d   } t   } | j t j |  | j t j d | f g  | j t j d    | j   t | t |  j d   d  S(   NR&  R   c         S   s   d  S(   N(   R^   (   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   <lambda>  s    R   (   R%   R   R   R,   R   R'   t	   YAMLErrort	   TypeErrort	   posixpathR   t   remotet   urllibt   quoteRr   Ra   R_   t   URLt   HTTPPOSTt   WRITEFUNCTIONt   performR1   R   (   R   R7   R   t   results_timet
   stamp_timet
   status_urlt   c(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   sendResultToServer  s&    	
N(   R   R   R   R   R   R^   R%  t   staticmethodR   R8  RD  RO  RP  RQ  RS  RW  Rg  (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     s   		<		J	!				t   LocalStatusc           B   sk   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z RS(   c         C   sI   | |  _  | j |  _ t   |  _ t |  _ d  |  _ | |  _	 | |  _
 d  S(   N(   R,  R1  R   t   sett	   installedR   R2  R^   t   effective_kernelt   remote_repot   logger(   R   R7   Rm  Rn  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     s    				c         C   s   g  } xc t  j  d  D]R } t t j j | d   j   d k r | j t j d |  j	 d   q q WxT t  j  d  D]C } t |  j   d k r| | j t j d |  j	 d   q| q| W| S(   Ns   /sys/module/ksplice_*/ksplicet   staget   applieds"   ^/sys/module/ksplice_(.*)/ksplice$i   s   /sys/kernel/ksplice/*/stages    ^/sys/kernel/ksplice/(.*)/stage$(
   t   globR%   R   R   R   RG   R/  R   R   t   group(   R   t   installed_idsR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getInstalledIDs  s    'c         C   sS   | d j  d  \ } } } } i | d 6| d 6| d 6| d 6| d d 6|  _ d  S(	   Ni    t   /R   R	  R   R   i   R  (   R   Rl  (   R   R$  RV   RY   RX   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   setEffective  s    c         C   s   |  j  d k	 r |  j  Sy) t t d  } t |  } | j   Wn t t j f k
 r\ d SXya t	   | d k rw d St
 | d  } t
 |  j    } | | k r d S| d |  _  |  j  SWn t t f k
 r d SXd S(   s   Returns the effective kernel, either as set in this run or as
           loaded from disk.  Returns None if the effective kernel cannot
           be determined.R"   RT  R(  RE  N(   Rl  R^   R   RU  R,   R   R   R'   RY  R   Rj  Rt  RZ  t   KeyError(   R   R   R$  t   were_installedt   now_installed(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     s&    c         C   s[   g  } x< |  j    D]. } |  j j |  } | r | j |  q q Wt |  |  _ |  j S(   N(   Rt  Rm  t
   idToUpdateR/  Rj  Rk  (   R   t   list_installedR   R6  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   getInstalledUpdates  s    c         C   s@   x9 | D]1 } |  j  j | d  | d <| d j | d <q Wd S(   s:   Augment a plan we read or downloaded with some extra info.R   t   UpdateR   N(   Rm  Rz  R   (   R   RL  RM  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt
   unpackPlan  s    c         C   sP   t  t j j |  j | d  d  } t |  d } | j   |  j |  | S(   NRG  R"   R   (   R   R   R   R   R   R,   R   R~  (   R   t
   which_planR   RK  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   readPlan  s
    %
c         C   s  t  |  j  } t j d  y|  j   |  j   } | j |  |  j |  | j |  |  j | d t | d  k	 r | j
 d k r |  j j   | _ n  | j |  |  n  | d  k	 r | j |  n  | d  k	 r | j |  n  | d  k	 r | j |  n  |  j d  k	 r9| j |  j g  | D] } | j ^ q  n  Wn2 t k
 rnt j d  t j t j    t SX|  j j r| s| j
 s| j
 t t t f k rt j d  y# | d  k	 r| j |  j  n  Wqt k
 r	t j d  t j t j    t SXn  t S(   Ns   Writing status to file.R4  i    s    Unable to write out status filess   Sending result to server.s*   Unable to send status to management server(    R   R   RJ   RK   R   R|  R8  R2  R
   R^   R   Rn  t   getDebugLogR   RD  RP  RQ  RS  Rl  RW  R   R   t   warningRL   RM   R   R,  t   allow_no_netR   t   ERROR_INVALID_KEYt   ERROR_MISSING_KEYRg  (   R   RB  R   t	   init_plant   remove_planRz   Rk  R6  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   writeOutStatus  sJ    
0c         C   s   |  j  d  S(   NR   (   R  (   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   readInitPlan(  s    c         C   s   |  j  d  S(   NRR  (   R  (   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   readRemovePlan+  s    c         C   s   |  j  d  S(   NR   (   R  (   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   readUpgradePlan.  s    (   R   R   R   Rt  Rv  R   R|  R~  R  R  R  R  R  (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyRi    s   							
			*		t   PackageListc           B   s   e  Z d d   Z RS(   c         C   s?  | d  k r t |  } n  | |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d |  _	 d |  _
 | d |  _ | d d |  _ | d } | d | d | d |  _ |  _ |  _ | d j d	 d  |  _
 | d j d
 d  |  _	 g  |  _ i  |  _ x7 | d D]+ } |  j j | d  | |  j | d <qWd  S(   Nt   0s   Protocol versionR   s   Ksplice Tools API versionR  R   R   R	  s   Version to Parses   Version to InstallR'  R   (   R^   R,   t   package_list_yamlt   errort   protocolVersiont   kspliceToolsApiVersionRX   R   RY   t   clientVersionToInstallt   clientVersionToParset   getRV  t   packageDataR/  (   R   t   textt   plt   kernt   item(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR   2  s,    									
)		N(   R   R   R^   R   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR  1  s   c   
      C   s$  z| r yE t  t j |  j  } |  j t j |  |  j t j t j  Wq t	 k
 r{ } | j
 t
 j k r|   q| q Xn  | r | } n t j   } |  j t j |  |  j t j d  |  j t j | j  |  j   |  j t j  } | d k rt t j j |   y t | | j    Wn[ t k
 r} y t j |  Wn. t	 k
 r~}	 |	 j
 t
 j k r|	  qn X|  n X|  j t j  } | d k rt j | | | f  qn> | d k r| d k rt j d |  t j | j    n  | SWd |  j t j t j  Xd S(   s  Downloads a file to disk with PycURL.

`c` - A pycurl.Curl() object. You probably want getCurl().
`url` - URL to download.
`filename` - Filename to download to.
`ifmodified` - If `filename` exists, only re-download it if the server's
               copy of `url` is newer (i.e., do the If-Modified-Since / 304
               Not Modified thing).
`stringio` - A (c)StringIO object that will be used to read content
             from the server. This can be useful if a caller needs the
             content of the response even if the server doesn't return
             a 200 OK.

Returns the HTTP response code; if you want more information, use
c.getinfo().

Raises non-ENOENT errors from os.stat, and any error from pycurl.
i   i   i    i  i  s"   The server returned error code %d:N(    Ry   R   R  t   st_mtimeRa   R_   t	   TIMEVALUEt   TIMECONDITIONt   TIMECONDITION_IFMODSINCER   R   R   t   StringIOR_  t   HTTPGETRa  R   Rb  t   getinfot   RESPONSE_CODER   R   R   R!   t   getvalueR   RR  t   INFO_FILETIMEt   utimeRJ   RK   t   TIMECONDITION_NONE(
   Rf  R   t   filenamet
   ifmodifiedt   stringiot   tR   Rz   t   rcodet   ee(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   downloadO  sH    	

t   UptrackConfigc           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   s   t    \ |  _ |  _ |  _ |  _ |  _ |  _ d  |  _ t	 j
   } y | j t g  Wn, t	 j k
 r } t d d | j   n X| |  _ |  j   |  j   |  j   |  j   |  j   |  j   |  j   |  j   d  |  _ d  S(   Ni   s   Unable to parse config file: (   RZ   RV   t   orig_hostnameRX   R   RY   RN   R^   RW   t   ConfigParsert   SafeConfigParserR#   R5   R   R6   R   R7   t   setMisct   setProxyt   setSSLt   setRepoPathst
   setCPUInfot
   setModulest	   setVMInfot   setIPt   removableModules(   R   R7   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     s"    -		







c         C   s  i  } d } y x t  d  j   D]t } | j d  rz | j d  d d } | | k rm | | c d 7<qz d | | <n  | j d  r" | d 7} q" q" WWn3 t k
 r t j t j    d d g |  _	 nF X| i  k r d | g |  _	 n' t
 | j    t | j    g |  _	 d  S(   Ni    s   /proc/cpuinfos   physical idR   i   s
   processor	(   R   R  t
   startswithR   R   RJ   RK   RL   RM   R  R  t   keyst   sumt   values(   R   t   socketst
   processorst   linet   pid(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s"    c         C   s   g  |  _  ye x^ t d  j   D]J } | j   d d !\ } } | j d  rS q n  |  j  j | | g  q WWn$ t k
 r t j t	 j
    n X|  j  j   d  S(   Ns   /proc/modulesi    i   t   ksplice(   t   modulesR   R  R   R  R/  R   RJ   RK   RL   RM   R.  (   R   R  R   t   size(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    	c         C   s   d  } y5 t j d g d t j } | j   d j   } Wn# t j k
 r` t d d   n Xy+ t t	 j
 j t   t t | d  Wn: t t f k
 r } t d d t d t |    n X| S(	   Nt   uuidgenR@   i    i   s&   Unable to generate a new Uptrack UUID.s   
s&   Unable to write the Uptrack UUID file s   :
 (   R^   RC   RD   RE   RF   RG   RI   R6   R   R   R   R   t   UPTRACK_UUID_FILER!   R   R   t   str(   R   R  t   procR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   newUUID  s    c         C   s   t  j d g d t  j d t  j } | j   \ } } | j d k rb t j d  t j |  n  yB t j	 t j
 j |  j d   t j	 t j
 j |  j d   Wn t k
 r n Xd  S(   Ns#   /usr/lib/uptrack/regenerate-crontabR@   RA   i    s   Error regenerating crontab.s   backoff-countert   backoff(   RC   RD   RE   t   STDOUTRF   RH   RJ   RK   R   t   unlinkR   R   R  R   (   R   RO   t   outputR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   regenerateCron  s    	#c         C   s   y t  |  j d  } Wn t k
 r0 d  } n X| t |  d k r t |  j d t |  d  t |  j d t t j d |   d  n  d  S(   Ns   /backoffs   
s   /backoff-counteri    (   R%   R  R   R^   R  R!   t   randomt	   randrange(   R   R  t   old(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   updateBackoff  s     
c         C   s  |  j  j d d  r |  j  j d d  } yS t |  j   |  _ |  _ |  j s| t j d  t j d  t	 j
 d  n  Wqt t f k
 r t j d | f  t j d  t	 j
 d  qXnI |  j |  _ y t j |  j  d |  _ Wn t j k
 rd |  _ n Xd	 S(
   s]   
        Adjust `hostname` if hostname_override_file is set, and set `fullhostname`.
        t   Settingst   hostname_override_files%   You must supply a non-empty hostname.sL   Please check the hostname_override_file option in /etc/uptrack/uptrack.conf.i   s    Unable to read hostname from %s.i    R[   N(   R7   R2   R  R%   RG   R   RW   RJ   R  t   syst   exitR   R   R  t   sockett   gethostbyaddr(   R   R  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   configureHostname  s"    	c         C   s7  d |  _  d |  _ |  j j d d  rB |  j j d d  |  _ n  d  |  _ d  |  _ d  |  _ t	 |  j d d t
  |  _ t	 |  j d d t  |  _ t	 |  j d d t  |  _ d  |  _ d  |  _ y8 t j d	 g d
 t j } | j   d j   |  _ Wn# t j k
 rt j   |  _ n Xt j j d  |  _ d  S(   Ns   /var/lib/uptrack/lockR[   t   AuthR  R  t   debug_to_servert   use_hw_uuidt   no_rmmodR  R@   i    s   /etc/redhat-release(   t   lockfileR  R7   R2   R  R^   R  R  R  R<   R
   R  R   R  R  R  R  RC   RD   RE   RF   RG   RI   RL   RM   R   R   R   t   rh_derivative(   R   RO   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s*    							c         C   s  d |  _  d  |  _ d  } |  j rQ |  j j d  j   } | d k rQ d  } qQ n  | d  k r ya t t  j	   } y t
 t t  j	    |  _  Wn) t k
 r t t j t   |  _ n XWq t t f k
 r q Xn  | s |  j   } n  |  j |  |  j   d  S(   Ni    R  s$   00000000-0000-0000-0000-000000000000(   t   serialR^   R  R  R  R  t   lowerR%   R  RG   Ry   t   UPTRACK_SERIAL_FILER4   R  R   R  R   R   R  t   setUUIDR  (   R   R  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   initWithLock%  s(    			 c         C   s   |  j  } |  j  d 7_  y5 t d } t | d |  j  f  t j | t  WnE t t f k
 r } t j d d t	 t
 d d t | f   n X| S(   sj    Increment self.serial and write the result to disk.

        Returns the previous serial number.
        i   s   .tmps   %d
s   Unable to store new serialt   exc_infos6   Unable to increment the Uptrack serial number (%s):
%s(   R  R  R!   R   t   renameR   R   RJ   RK   R
   R6   (   R   R  t   tmp_serial_fileR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   incrementSerialA  s    	
c         C   sE  d |  _ |  j j d d  rm |  j j d d  j   } | rm | j   d k r] d |  _ n	 | |  _ d Sn  x: d d d g D]) } | t j k r} t j | |  _ d Sq} Wt	 |  j d d t
  } t o | s d Sy[ t j   } | j d	  r,| j d
  } | j d  } d | d t |  |  _ n  Wn t k
 r@n Xd S(   s   Set self.proxy based on config and the environment.

        Set self.proxy to the value of a proxy server to use to talk to the
        Uptrack server, based on the config file, the envrionment, and the
        global GConf database if available.

        Upon return, self.proxy will be set in one of three ways:

        - None: No proxy setting was detected. Uptrack will let pycurl attempt
                to choose a proxy based on its own defaults.
        - '':   The user explicitly requested that no proxy be used. Uptrack will
                force pycurl not to use a proxy.
        - Any other string: The URL of an HTTPS proxy server to use with
                the CONNECT method.

        In order to allow the user to explicitly specify "no proxy" globally, we
        accept the value 'none' (case insensitive) in the Network.https_proxy
        setting in uptrack.conf, and translate it to self.proxy = ''. An empty
        setting is taken to be unset, and will result in self.proxy being None.

        (Note that, confusingly, this means that "Network.https_proxy = none"
         corresponds to self.proxy = '', and vice versa.)
        t   Networkt   https_proxyt   noneR[   Nt   HTTPS_PROXYt
   http_proxyt   gconf_proxy_lookups!   /system/http_proxy/use_http_proxys   /system/http_proxy/hosts   /system/http_proxy/ports   http://R   (   R^   Rk   R7   R2   R  RG   R  R   t   environR<   R
   t
   have_gconft   gconft   client_get_defaultt   get_boolt
   get_stringt   get_intR  R   (   R   Rk   R"  t   enable_gconft   clientt   hostt   port(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR  T  s0    		"c         C   s   g  |  _  |  j j d d  rI |  j  j t j |  j j d d  f  n  |  j j d d  r |  j  j t j |  j j d d  f  n  d  S(   NR  t   ssl_ca_cert_filet   ssl_ca_cert_dir(   Rg   R7   R2   R/  R_   Rh   R  t   CAPATH(   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    	c         C   s   t  |  _ t j j |  j |  j |  j |  j |  j  |  _	 t
 |  _ |  j j d d  r |  j j d d  j   } | r | |  _ q n  d  S(   NR  t   update_repo_url(   t   UPTRACK_CACHE_DIRR  R   R   R   RV   RY   RX   R   R1  R	   R   R7   R2   R  RG   (   R   R\  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    		c         C   sC   | |  _  t j |  j t j |  j  d t j |  j    |  _ d  S(   Ns   +uuid(   R  R[  R   R   R]  R^  R  R\  (   R   R  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    	c         C   s"   t  |  d  s t   |  _ n  d  S(   NR  (   t   hasattrt	   getVMInfoR  (   R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    c         C   s  t  |  j d d t  r, i d d 6|  _ d Syd } } } } } } } } |  j }	 |  j ro |  j }	 n  t j |	  \ } } |  j r | j	 d  r t j d |	  \ } } n  | r t j
 |  \ } } n  | r t j |  \ } } n  | rt j |  \ } } n  | rt j |  }
 t j d d	 d
 |
 g d t j d t j } | j   d } d | k ri | | j d  j   d d 6|  _ qi d | d 6|  _ n i d |	 d 6|  _ Wn6 t k
 r} i d t |  | |	 f d 6|  _ n Xd S(   s.  
        Set localip to a dictionary of the form {"IP": "X.X.X.X"}.

        If the suppress_ip config option is enabled, set a dummy
        address. Otherwise, try to get it from the 'ip' command. Upon failure,
        set localip to an error dict of the form {"Error": "error_msg"} instead.
        R  t   suppress_ips   0.0.0.0R   Ns   //s   http://t   ipt   routeR  R@   RA   i    s    src i   s/   Could not parse IP address from route data (%s)R   s4   Could not parse hostname out of remote or proxy (%s)s   %s (host = %s, uri = %s)(   R<   R7   R   R  R^   R   Rk   R]  t	   splittypeR  t	   splithostt	   splitusert	   splitportR  t   gethostbynameRC   RD   RE   R  RF   t   indexR   R   R  (   R   t   protoR   t   hostportR   t   userinfoR   R  R  t   urit   remoteipRO   t	   routedataR   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s8    "		*(   R   R   R   R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    												7					c          C   sc   yE x> t  d d  D]- }  |  j   } | d d d !d k r t Sq WWn t t f k
 r^ n Xt S(   Ns   /proc/bus/pci/devicesR"   i   i    i   t   80ee(   R   R   R
   R   t
   IndexErrorR   (   R  t   fields(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s    t   TimeoutExceptionc           B   s   e  Z RS(    (   R   R   (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR    s   c         C   s   t  d d  } t j |  d t j d | } t j | j g g  g  |  d r | j   } | d k rz | j j   j   St j	 | |    n | j
   t  d  S(   Ns	   /dev/nullR   R@   RA   i    (   R   RC   RD   RE   t   selectR@   t   waitR#   RG   RI   t   killR  (   R   t   output_timeoutt   devnullR  t	   exit_code(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt
   call_timed  s    "
c          C   s  i  }  t  d d  } y t d d g d  |  d <WnF t t j f k
 r` } t |  |  d <n t k
 rz d |  d <n X|  j d  d	 k rRd
 |  d <|  d =t   rEyO t d d g d  j	 d  |  d <y |  d j
 d	  Wn t k
 r n XWqOt t j f k
 r'} t |  |  d <qOt k
 rAd |  d <qOXqkd |  d <n d |  k rkd |  d <n  d |  k ry t j d d d g d t j d | } x | j   d j	 d  D]v } | j	 d d  } t |  d k r| d |  d <n  | j	 d d  } t |  d k r|  j d | d  qqW| j   rUd | j |  d <n  Wqt t t j f k
 r} t |  |  d <qXn  y  t t d  j    |  d <Wn d |  d <n X|  S(   s;   Find the UUID of this machine and of any VMs it is hosting.s	   /dev/nullR   t   cats   /sys/hypervisor/uuidi   R  t	   xen_errors=   Read of /sys/hypervisor/uuid timed out; is xenstored running?s$   00000000-0000-0000-0000-000000000000s   Xen dom0Ro   s   xenstore-lists   /vms   
t   childrens3   xenstored-list /vm timed out; is xenstored running?s   xenstored isn't runnings   Xen paravirt domUt	   dmidecodes   -tt   systemR@   RA   i    s   UUID: s   Product Name: s   dmidecode -t system returned %dt   dmidecode_errors   /proc/vz/veinfot   num_containers(   R   R  R   RC   RI   R  R  R  t   xenstored_is_runningR   RR  R4   RD   RE   RF   R  t
   setdefaultR  RH   R   R   R  (   R  R  R   R  R  Rz   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR     sZ    
	"  c          C   sD   d }  x7 |  d k r? t  d  r% t St j d  |  d 8}  q	 Wt S(   Ni   i    t	   xenstoredi   (   t   proc_is_runningR
   t   timet   sleepR   (   t   timeout(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR"  9  s    c         C   s4   x- t    D]" } |  t j j |  k r
 t Sq
 Wt S(   N(   t   process_listR   R   t   basenameR
   R   (   R   R  (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR%  B  s    c          C   s   t    }  g  t j d  D] } | j   r | ^ q } x | D] } ym t t j j d | d  d  j   } | j d  } | r | d j   } | r |  j	 | d  q n  Wq> t
 k
 r q> q> Xq> W|  S(   Ns   /proct   cmdlinet   rbt    i    (   Rj  R   t   listdirRt   R   R   R   R#   R   t   addR   (   t	   processesR  t   pidsR+  R   (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR)  H  s    	.'c          C   s*   y t  d  j   }  Wn d }  n X|  S(   s4   Return the value of `mmap_min_addr` on this machine.s   /proc/sys/vm/mmap_min_addrN(   R%   RG   R^   (   t   mmap_min_addr(    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyR  W  s
    
(k   R  R*  R   R   t   os.pathR   R  R]  R[  R_   t	   cStringIOR  R  R  RJ   R  RL   R   Rq  R&  t   version_infoRC   t   subprocess_compatRj  t	   NameErrort   setsR   R'   R   R)   R   R/   t   ImportErrorR   R   t   uptrackR   R   R  R
   R  R   R  R)  Rb   R   t   USE_SERVER_RESOLVERR5   R  R  R  RJ  R0  R	   RU  t   ERROR_GENERIC_ERRORR   t   ERROR_INTERNAL_ERRORt   ERROR_USER_NO_CONFIRMt   ERROR_UNSUPPORTEDR  t   ERROR_TOO_OLD_INSTALLt   ERROR_TOO_OLD_PARSEt   ERROR_EXPIREDt   ERROR_INTERNAL_SERVER_ERRORt   ERROR_MACHINE_NOT_ACTIVATEDR  t   ERROR_SYS_NOT_MOUNTEDt   ERROR_MALFORMED_YAMLR   R   R!   R%   R,   R^   R1   R<   RQ   RZ   R]   Rq   Rr   R   R   R   R   t   objectR   R   R   R6   t   server_error_exceptionR   R   R   Ri  R  R  R  R  R  R  R   R"  R%  R)  R  (    (    (    s'   /usr/lib/pymodules/python2.7/Uptrack.pyt   <module>   s     

	
	
											)	 A I			E				