← Back
Editing: release.cpython-38.pyc
U W[� � @ sj d Z ddlmZ ddlZddlmZ G dd� de�ZG dd� de�ZG d d � d e�Z dd d�Z dd� ZdS )zf A release-automation toolkit. Don't use this outside of Twisted. Maintainer: Christopher Armstrong � )�print_functionN)� raw_inputc @ s e Zd ZdZdS )�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 s r c @ s e Zd ZdZdS )�DirectoryDoesntExistz6 Some directory doesn't exist when it should. Nr r r r r r s r c @ s e Zd ZdS )� CommandFailedN)r r r r r r r r % s r TFc C sF t d| � |r td��d�r dS |r,d| } t�| �dkrBt| ��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 )�printr � startswith�os�systemr )ZcommandZnull�promptr r r �sh, s r c O s, t j�d�}z| ||�W �S t �|� X d S )N�.)r �path�abspath�chdir)�f�args�kwZorigdirr r r �runChdirSafe>