Repository URL to install this package:
|
Version:
1.0.7~rc2 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
tox
/
__pycache__
/
exception.cpython-37.pyc
|
|---|
B
O([ðã @ sÖ d dl Z d dlZd dlZdd ZG dd deZG dd deZG dd d eZG d
d deeZ G dd
d
eZ
G dd deZG dd deZG dd deZ
G dd deZG dd deZG dd deZdS )é Nc C s² d | |¡}|dk r®|dk s.tjdkr |dkr dd tt ¡ D }|dk rj| | ¡}|d ||¡7 }n6|d |¡7 }|d }| |¡}|r |d
|||¡7 }|d |¡7 }|S )aP String representation for an InvocationError, with exit code
NOTE: this might also be used by plugin tests (tox-venv at the time of writing),
so some coordination is needed if this is ever moved or a different solution for this hack
is found.
NOTE: this is a separate function because pytest-mock `spy` does not work on Exceptions
We can use neither a class method nor a static because of https://bugs.python.org/issue23078.
Even a normal method failed with "TypeError: descriptor '__getattribute__' requires a
'BaseException' object but received a 'type'".
z{} for command {}Nr Úposixé c S s i | ]\}}| d ¡r||qS )ZSIG)Ú
startswith)Ú.0ÚnameÚnumber© r ú/build/wlanpi-profiler-CSvHZ8/wlanpi-profiler-1.0.7~rc2/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/tox/exception.pyú
<dictcomp> s z!exit_code_str.<locals>.<dictcomp>z (exited with code {:d} ({}))z (exited with code {:d})zH)
Note: this might indicate a fatal error signal ({:d} - 128 = {:d}: {}))ÚformatÚosr ÚvarsÚsignalÚitemsÚget)Úexception_nameÚcommandÚ exit_codeZstr_ZsignalsZsig_namer r r r r Ú
exit_code_str s"
r c @ s e Zd Zdd ZdS )ÚErrorc C s d | jj| jd ¡S )Nz{}: {}r )r Ú __class__Ú__name__Úargs)Úselfr r r Ú__str__* s z
Error.__str__N)r Ú
__module__Ú__qualname__r r r r r r ) s r c s e Zd ZdZ fddZ ZS )ÚMissingSubstitutionZTOX_MISSING_SUBSTITUTIONc s || _ tt| |¡ d S )N)r Úsuperr Ú__init__)r r )r r r r 2 s zMissingSubstitution.__init__)r r r ZFLAGr Ú
__classcell__r r )r r r . s r c @ s e Zd ZdZdS )ÚConfigErrorzError in tox configuration.N)r r r Ú__doc__r r r r r! 7 s r! c @ s e Zd ZdZdS )ÚSubstitutionStackErrorz2Error in tox configuration recursive substitution.N)r r r r" r r r r r# ; s r# c @ s e Zd ZdZdS )ÚUnsupportedInterpreterz#Signals an unsupported Interpreter.N)r r r r" r r r r r$ ? s r$ c @ s e Zd ZdZdS )ÚInterpreterNotFoundz/Signals that an interpreter could not be found.N)r r r r" r r r r r% C s r% c s* e Zd ZdZd fdd Zdd Z ZS )ÚInvocationErrorz!An error while invoking a script.Nc s( t t| ||¡ || _|| _|| _d S )N)r r r r r Úout)r r r r' )r r r r J s zInvocationError.__init__c C s t | jj| j| jS )N)r r r r r )r r r r r P s zInvocationError.__str__)NN)r r r r" r r r r r )r r r&