Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/unittest/signals.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@s�ddlZddlZddlmZeZdefd��YZej�Z	d�Z
d�Zda
d�Zdd�ZdS(	i�N(twrapst_InterruptHandlercBseZd�Zd�ZRS(cCsst|_||_t|t�rf|tjkr<tj}qf|tjkrWd�}qft	d��n||_
dS(NcSsdS(N((t
unused_signumtunused_frame((s&/sys/lib/python2.7/unittest/signals.pytdefault_handlerssYexpected SIGINT signal handler to be signal.SIG_IGN, signal.SIG_DFL, or a callable object(tFalsetcalledtoriginal_handlert
isinstancetinttsignaltSIG_DFLtdefault_int_handlertSIG_IGNt	TypeErrorR(tselfR((s&/sys/lib/python2.7/unittest/signals.pyt__init__
s		cCs{tjtj�}||k	r1|j||�n|jrM|j||�nt|_xtj�D]}|j�qcWdS(N(	R
t	getsignaltSIGINTRRtTruet_resultstkeyststop(Rtsignumtframetinstalled_handlertresult((s&/sys/lib/python2.7/unittest/signals.pyt__call__s		(t__name__t
__module__RR(((s&/sys/lib/python2.7/unittest/signals.pyR	s	cCsdt|<dS(Ni(R(R((s&/sys/lib/python2.7/unittest/signals.pytregisterResult*scCsttj|d��S(N(tboolRtpoptNone(R((s&/sys/lib/python2.7/unittest/signals.pytremoveResult-scCsDtdkr@tjtj�}t|�atjtjt�ndS(N(t_interrupt_handlerR!R
RRR(R((s&/sys/lib/python2.7/unittest/signals.pytinstallHandler1scsT�dk	r+t���fd��}|Stdk	rPtjtjtj�ndS(NcsEtjtj�}t�z�||�SWdtjtj|�XdS(N(R
RRt
removeHandler(targstkwargstinitial(tmethod(s&/sys/lib/python2.7/unittest/signals.pytinner;s
(R!RR#R
RR(R)R*((R)s&/sys/lib/python2.7/unittest/signals.pyR%9s
(R
tweakreft	functoolsRRt
__unittesttobjectRtWeakKeyDictionaryRRR"R!R#R$R%(((s&/sys/lib/python2.7/unittest/signals.pyt<module>s 			

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.