
    hP                     b    S r SSKr " S S\5      r " S S\5      r " S S\5      rSS	 jrS
 rg)zf
A release-automation toolkit.

Don't use this outside of Twisted.

Maintainer: Christopher Armstrong
    Nc                       \ rS rSrSrSrg)DirectoryExists   z*
Some directory exists when it shouldn't.
 N__name__
__module____qualname____firstlineno____doc____static_attributes__r       ]/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/python/release.pyr   r           	r   r   c                       \ rS rSrSrSrg)DirectoryDoesntExist   z.
Some directory doesn't exist when it should.
r   Nr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrg)CommandFailed"   r   N)r   r	   r
   r   r   r   r   r   r   r   "   s    r   r   c                     [        SU 5        U(       a   [        S5      R                  S5      (       a  gU(       a  SU -  n [        R                  " U 5      S:w  a  [        U 5      eg)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!   )   sX     
%&&s++"W,	yyQG$$ r   c                     [         R                  R                  S5      n U " U0 UD6[         R                  " U5        $ ! [         R                  " U5        f = f)N.)r   pathabspathchdir)fargskworigdirs       r   runChdirSafer+   :   s=    ggooc"G$~"~
s	   ? A)TF)r   r   OSErrorr   r   r   r!   r+   r   r   r   <module>r-      s=    

	g 		7 		G 	%"r   