o ¯bPã@sRdZddlZGdd„deƒZGdd„deƒZGdd„deƒZdd d „Zd d„ZdS)zf A release-automation toolkit. Don't use this outside of Twisted. Maintainer: Christopher Armstrong éNc@óeZdZdZdS)ÚDirectoryExistsz2 Some directory exists when it shouldn't. N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©r r ú8/usr/lib/python3/dist-packages/twisted/python/release.pyrórc@r)ÚDirectoryDoesntExistz6 Some directory doesn't exist when it should. Nrr r r r r r r c@s eZdZdS)Ú CommandFailedN)rrrr r r r r "sr TFcCsFtd|ƒ|rtdƒ d¡rdS|rd|}t |¡dkr!t|ƒ‚dS)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--$zrun ?? ÚnNz%s > /dev/nullr)ÚprintÚinputÚ startswithÚosÚsystemr )ÚcommandÚnullÚpromptr r r Úsh)s ÿrc Os4tj d¡}z ||i|¤ŽWt |¡St |¡w)NÚ.)rÚpathÚabspathÚchdir)ÚfÚargsÚkwÚorigdirr r r Ú runChdirSafe:s r )TF)rrÚOSErrorrr r rr r r r r Ús