ó
Qº’Nc           @   sB   d  d l  Z  d  d l Z d  d l m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿN(   t   DistUpgradeFetcherCoret   DistUpgradeFetcherSelfc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sˆ   t  j |  | | ƒ | |  _ |  j d g 7_ | j d  k	 rY |  j d | j g 7_ n  | j d  k	 r„ |  j d | j g 7_ n  d  S(   Ns   --with-networks
   --cdrom=%ss   --frontend=%s(   R    t   __init__t   viewt   run_optionst	   cdromPatht   Nonet   frontend(   t   selft   new_distt   progresst   optionsR   (    (    sF   /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.pyR      s    	c         C   s   |  j  j | | ƒ S(   N(   R   t   error(   R   t   summaryt   message(    (    sF   /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.pyR      s    c         C   s8   t  j d ƒ t  j ƒ  t j d d ƒ t j |  ƒ d S(   s,    overwrite to ensure that the log is copied s&   runDistUpgrader() called, re-exec selfs   /var/log/dist-upgrade/main.logs*   /var/log/dist-upgrade/main_update_self.logN(   t   loggingt   infot   shutdownt   shutilt   copyR    t   runDistUpgrader(   R   (    (    sF   /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.pyR      s
    
	(   t   __name__t
   __module__R   R   R   (    (    (    sF   /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.pyR      s   		(   R   R   R    R   (    (    (    sF   /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.pyt   <module>   s   