Current File : //usr/lib64/python2.7/site-packages/problem/watch.pyc
�
�v_c@s>ddlZddlZddlZdefd��YZdS(i����NtProblemWatchercBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s� New problem signal handler attached to DBus signal

    Use ``auth=True`` if authentication should be attempted for
    new problem that doesn't belong to current user. If not
    set such a problem is ignored.

    cCs�ddl}ddl}ddlm}|j�|jd|�dt�}||_||_g|_	|jj
|jdddd�}|jj
|jdddd	�}|j�|_
dS(
Ni����(t
DBusGMainLooptmainlooptprivatetsignal_nametCrashtpaths/org/freedesktop/problemss/com/redhat/abrt(tdbustgobjecttdbus.mainloop.glibRtthreads_initt	SystemBustTruetbustautht	callbackstadd_signal_receivert_new_problem_handlertMainLooptloop(tselfRRRRR
t	evt_matchtevt_match_old_path((s3/usr/lib64/python2.7/site-packages/problem/watch.pyt__init__s"
										cCs�tjd�t|�tj�krI|jrItjdj|��dStjj	|tj
j��}x|jD]}||�qqWdS(Ns!New problem notification receiveds+Auth disabled, ignoring crash with uid: {0}(
tloggingtdebugtinttostgetuidRtformattproblemttoolst
problemifytproxiest	get_proxyR(Rtcomptddirtuidtuuidtduphashtprobtcb((s3/usr/lib64/python2.7/site-packages/problem/watch.pyR,s
"
cCs|jj|�dS(s{ Add callback to be called when new problem occurs.

        Each callback function receives ``Problem`` instance

        N(Rtappend(Rtfun((s3/usr/lib64/python2.7/site-packages/problem/watch.pytadd_callback7scCs|jj�dS(s Start event listener loop N(Rtrun(R((s3/usr/lib64/python2.7/site-packages/problem/watch.pyR-@scCs|jj�dS(s Stop event listener loop N(Rtquit(R((s3/usr/lib64/python2.7/site-packages/problem/watch.pyR.Es(t__name__t
__module__t__doc__RRR,R-R.(((s3/usr/lib64/python2.7/site-packages/problem/watch.pyRs					(RRRtobjectR(((s3/usr/lib64/python2.7/site-packages/problem/watch.pyt<module>s