v_c@sddlZddlZddlZddlmZmZmZmZddlTdZ dZ dZ dZ dZ d Zd Zd Zd gZie d 6e d6e d6e d6e d6ed6ed6ed6ZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefd YZd!efd"YZd#efd$YZeejd%Zeejd&Z ed'Z!dS((iN(tproxiest exceptionttoolstwatch(t*tjavatselinuxtCCpptPythont Kerneloopstruntimetxorgt libreportt executabletJAVAtSELINUXtCCPPtPYTHONt KERNELOOPStRUNTIMEtXORGtUNKNOWNtProblemcBseZdZdZedZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZRS(s Base class for the other problem types. No need to use this class directly, use one of the specific problem classes. cCsat|_t|_t|_d|_d|_||_||_ ||_ t j |_dS(N( tdictt_datat _dirty_datatFalset _persistedtNonet_proxyt_probdirttypetanalyzertreasonRt get_proxy(tselfttypR!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyt__init__'s        cCs| r4t|tkr4|jr4t|}nitjjdfd6}||kr||\}}|r{|}n||}n|rt|S|S(NcSs |jdS(Ns%s(tstrftime(tx((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyt;sttime(Rtstrtisdigittinttdatetimet fromtimestamp(R#tattrtvaltreversetmappingtfuntrevfun((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyt__cast3s%    cCstdj|}d}||jkrF|j|dkrF|n||jkre|j|}n|jr|jj|j|}||j|(R7t __class__t__name__R!(R#((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyt__repr__scCsEtj|_tj|_tjjtjdd|_ dS(sX Add pid, gid and executable of current process to this problem object iiN( tostgetpidtpidtgetgidtgidtpathtabspathtinspecttstackR (R#((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytadd_current_process_datascCsHd|_x8tjjD]'\}}|jdj||7_qWdS(s; Add environment of current process to this problem object ts{0}={1} N(tenvironRIt iteritemsR7(R#tkeyR?((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytadd_current_environments cCs |jjS(N(Rtitems(R#((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRXscCs?x8tD]0}t||stjdj|qqWdS(NsMissing required field {0}(tREQUIRED_FIELDSthasattrRtValidationErrorR7(R#tfield((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytvalidates c Cs|jt}x?|jjD].\}}|j||dt|t||jr:|jj|jt|_d|_i|_ndS(s Delete this problem N(RRtdeleteRRRR(R#((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRes    (RGt __module__t__doc__R%RR9R=R;R@RCRDRERHRRRWRXR]RdRe(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRs             "tJavacBseZdZdZRS(s Java problem cCstt|jt|dS(N(R:RhR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRhstSelinuxcBseZdZdZRS(s Selinux problem cCstt|jt|dS(N(R:RiR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRistCcppcBseZdZdZRS(s C, C++ problem cCstt|jt|dS(N(R:RjR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRjscBseZdZdZRS(s Python problem cCstt|jt|dS(N(R:RR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRscBseZdZdZRS(s Kerneloops problem cCstt|jt|dS(N(R:R R%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR stXorgcBseZdZdZRS(s Xorg problem cCstt|jt|dS(N(R:RkR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRkstRuntimecBseZdZdZRS(s Runtime problem cCstt|jt|dS(N(R:RlR%R(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRlstUnknowncBseZdZdZRS(s Unknown problem cCstt|jd|dS(NR (R:RmR%(R#R!((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR%s(RGRfRgR%(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pyRmscs4j}|rj}ntfd|S(s Return the list of the problems Use ``auth=True`` if authentication should be attempted. If authentication via polkit fails, function behaves as if ``auth=False`` was specified (only users problems are returned). cstj|S(N(Rt problemify(R'(t__proxy(s6/usr/lib64/python2.7/site-packages/problem/__init__.pyR(s(tlisttlist_alltmap(tauthRoR3((Ros6/usr/lib64/python2.7/site-packages/problem/__init__.pyRps  cCs>|j}|r|j}n||kr.dStj||S(s Return problem object matching ``identifier`` Return ``None`` in case the problem does not exist. Use ``auth=True`` if authentication should be attempted. N(RpRqRRRn(t identifierRsRoR3((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytgets  cCs tj|S(s Return ``ProblemWatcher`` object which can be used to attach callbacks called when new problem is created 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. (RtProblemWatcher(Rs((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytget_problem_watchers ("RIRPR-tproblemRRRRt_pyabrtRRRRRRRRRYt PROBLEM_TYPEStobjectRRhRiRjRR RkRlRmRR"RpRuRw(((s6/usr/lib64/python2.7/site-packages/problem/__init__.pytsD   "