ó
zHc           @   s|   d  Z  d d l Z d d l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e d	 „ Z	 d
 „  Z
 d S(   sf   
A release-automation toolkit.

Don't use this outside of Twisted.

Maintainer: Christopher Armstrong
iÿÿÿÿNt   DirectoryExistsc           B   s   e  Z d  Z RS(   s(   Some directory exists when it shouldn't.(   t   __name__t
   __module__t   __doc__(    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyR       s   t   DirectoryDoesntExistc           B   s   e  Z d  Z RS(   s,   Some directory doesn't exist when it should.(   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyR      s   t   CommandFailedc           B   s   e  Z RS(    (   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyR      s   c         C   sf   d G|  GH| r+ t  d ƒ j d ƒ r+ d Sn  | r> d |  }  n  t j |  ƒ d k rb t |  ƒ ‚ n  d S(   s¸   
    I'll try to execute `command', and if `prompt' is true, I'll
    ask before running it.  If the command returns something other
    than 0, I'll raise CommandFailed(command).
    s   --$s   run ?? t   nNs   %s > /dev/nulli    (   t	   raw_inputt
   startswitht   ost   systemR   (   t   commandt   nullt   prompt(    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyt   sh"   s    	c         O   s8   t  j j d ƒ } z |  | | Ž  SWd  t  j | ƒ Xd  S(   Nt   .(   R	   t   patht   abspatht   chdir(   t   ft   argst   kwt   origdir(    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyt   runChdirSafe4   s    (   R   R	   t   ret   OSErrorR    R   R   t   Truet   FalseR   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/twisted/python/release.pyt   <module>   s   