
    \dP                     t    d Z ddlZ G d de          Z G d de          Z G d de          ZddZd ZdS )zf
A release-automation toolkit.

Don't use this outside of Twisted.

Maintainer: Christopher Armstrong
    Nc                       e Zd ZdZdS )DirectoryExistsz2
    Some directory exists when it shouldn't.
    N__name__
__module____qualname____doc__     6lib/python3.11/site-packages/twisted/python/release.pyr   r                	Dr   r   c                       e Zd ZdZdS )DirectoryDoesntExistz6
    Some directory doesn't exist when it should.
    Nr   r
   r   r   r   r      r   r   r   c                       e Zd ZdS )CommandFailedN)r   r   r   r
   r   r   r   r   "   s        Dr   r   TFc                     t          d|            |r$t          d                              d          rdS |rd| z  } t          j        |           dk    rt          |           dS )z
    I'll try to execute C{command}, and if C{prompt} is true, I'll
    ask before running it.  If the command returns something other
    than 0, I'll raise C{CommandFailed(command)}.
    z--$zrun ?? nNz%s > /dev/nullr   )printinput
startswithossystemr   )commandnullprompts      r   shr   )   s|     
% &&s++ 	F -"W,	yQG$$$ r   c                     t           j                            d          }	  | |i |t          j        |           S # t          j        |           w xY w)N.)r   pathabspathchdir)fargskworigdirs       r   runChdirSafer&   :   sR    gooc""Gq$~"~~
s	   = A)TF)r	   r   OSErrorr   r   r   r   r&   r
   r   r   <module>r(      s     
			
	 	 	 	 	g 	 	 		 	 	 	 	7 	 	 		 	 	 	 	G 	 	 	% % % %"    r   