Repository URL to install this package:
|
Version:
1.0.7~rc2 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
tox
/
__pycache__
/
action.cpython-37.pyc
|
|---|
B
©x%>Ígã @ s¼ d dl mZmZ d dlZd dlZd dlZd dlZd dlZd dlZd dl m
Z
d dlmZ d dl
Z
d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d
lmZ G dd deZdS )
é )Úabsolute_importÚunicode_literalsN)Úcontextmanager)ÚThread)Úreporter)ÚINFO)ÚInvocationError)Ú Verbosity)Úget_unique_file)Úis_main_threadc @ s e Zd ZdZdd Zdd Zdd Zdd Zd
d ZdddZ dd Z
dd Zedd Z
edd Zdd Zdd Zdd ZdS ) ÚActionzMAction is an effort to group operations with the same goal (within reporting)c C sn || _ || _|| _| j dd¡d | _|| _|| _|| _|| _d | _ || _
| | _|
| _|| _
t rj| ¡ d S )Nú é r )ÚnameÚargsÚmsgÚsplitÚactivityÚlog_dirÚgenerate_tox_logÚ via_popenÚcommand_logÚ
_timed_reportÚpythonÚsuicide_timeoutÚinterrupt_timeoutÚterminate_timeoutr Ú_install_sigterm_handler)Úselfr r r r r r Úpopenr r r r © r ú/build/wlanpi-profiler-CSvHZ8/wlanpi-profiler-1.0.7~rc2/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/tox/action.pyÚ__init__ s zAction.__init__c C s: d | jd tt| j¡¡}t | j|¡| _ | j
¡ | S )Nz{} {}r
)Úformatr ÚjoinÚmapÚstrr r Ztimed_operationr r Ú __enter__)r r r r r! r' 9 s
zAction.__enter__c C s | j |||¡ d S )N)r Ú__exit__)r ÚtypeÚvalueÚ tracebackr r r! r( @ s zAction.__exit__c C sD || _ |r&tjd | j||¡dd ntjd | j||¡dd d S )Nz {} {}: {}T)Úbold)r r Z
verbosity0r# r Ú
verbosity1)r r r r r r! ÚsetactivityC s zAction.setactivityc C s t jd | j||¡dd d S )Nz {} {}: {}T)r, )r r- r# r )r r r r r r! ÚinfoJ s zAction.infoNTFc
C s |dkrt j ¡ n|}dd | ||¡D }
d dd |
D ¡}| |||||¡}d\}
}|¢\}}}}z¨yD| j|
||t||dkrtj
¡ n|dd tjd
kr¦t
jndd}W n( tk
rØ } z
|j}
W dd}~X Y n8X |dk rê|| t ||||j¡ | |||¡}|j}
W d|dk rJ| ¡ rJ| d
¡ d¡}d |dd
¡}z|
ræ|sæ| rÚd |
¡}|dk r|d |¡7 }| ¡ s|d7 }t |¡ |dk rÚ| ¡ rÚt ddtj¡ t |¡ t ddtj¡ t||
|W d| j !|
||
¡ X X W dQ R X |S )z,this drives an interaction with a subprocessNc S s g | ]}t |qS r )r&