/usr/lib64/python2.6/site-packages
NameSizeModeActions
backports/-0755rm
cairo/-0755rm
cffi/-0755rm
cffi-1.2.1-py2.6.egg-info/-0755rm
Cheetah/-0755rm
Cheetah-2.4.1-py2.6.egg-info/-0755rm
cryptography/-0755rm
cryptography-1.0.2-py2.6.egg-info/-0755rm
curl/-0755rm
dns/-0755rm
gpgme/-0755rm
gtk-2.0/-0755rm
jinja2/-0755rm
Jinja2-2.2.1-py2.6.egg-info/-0755rm
lxml/-0755rm
lxml-2.2.3-py2.6.egg-info/-0755rm
M2Crypto/-0755rm
matplotlib/-0755rm
meld3/-0755rm
modulator/-0755rm
mpl_toolkits/-0755rm
msgpack/-0755rm
msgpack_python-0.4.6-py2.6.egg-info/-0755rm
msgpack_python-0.4.7-py2.6.egg-info/-0755rm
mx/-0755rm
MySQLdb/-0755rm
MySQL_python-1.2.5-py2.6.egg-info/-0755rm
netifaces-0.10.4-py2.6.egg-info/-0755rm
numpy/-0755rm
OpenSSL/-0755rm
policycoreutils/-0755rm
problem/-0755rm
psutil/-0755rm
pylve-2.1-py2.6.egg-info/-0755rm
pynche/-0755rm
PyYAML-3.11-py2.6.egg-info/-0755rm
report/-0755rm
reportclient/-0755rm
rpm/-0755rm
selinux/-0755rm
sepolgen/-0755rm
setools/-0755rm
simplejson/-0755rm
simplejson-3.8.0-py2.6.egg-info/-0755rm
simplejson-3.8.2-py2.6.egg-info/-0755rm
wrapt/-0755rm
wrapt-1.10.5-py2.6.egg-info/-0755rm
wrapt-1.10.8-py2.6.egg-info/-0755rm
yaml/-0755rm
abrt.pth300644editdlrm
abrt_exception_handler.py70770644editdlrm
abrt_exception_handler.pyc48050644editdlrm
abrt_exception_handler.pyo48050644editdlrm
acutilmodule.so60240644editdlrm
audit.py433520644editdlrm
audit.pyc419670644editdlrm
audit.pyo419670644editdlrm
auparse.so486160755editdlrm
dmidecode.py34610644editdlrm
dmidecode.pyc23200644editdlrm
dmidecode.pyo23200644editdlrm
dmidecodemod.so1851040755editdlrm
drv_libxml2.py150610644editdlrm
drv_libxml2.pyc113290644editdlrm
drv_libxml2.pyo113290644editdlrm
egenix_mx_base-3.1.1-py2.6.egg-info34640644editdlrm
ethtool-0.6-py2.6.egg-info2880644editdlrm
ethtool.so382800755editdlrm
gudev.so259840644editdlrm
iwlib-1.0-py2.6.egg-info3580644editdlrm
iwlib.so89600644editdlrm
libxml2.py3397760644editdlrm
libxml2.pyc4449240644editdlrm
libxml2.pyo4449240644editdlrm
libxml2mod.a5667620644editdlrm
libxml2mod.la10150755editdlrm
libxml2mod.so3680720755editdlrm
M2Crypto-0.20.2-py2.6.egg-info11600644editdlrm
matplotlib-0.99.1.1-py2.6.egg-info6060644editdlrm
meld3-0.6.7-py2.6.egg-info2590644editdlrm
netifaces.so438490644editdlrm
numpy-1.4.1-py2.6.egg-info16100644editdlrm
ordereddict-1.2-py2.6.egg-info1830644editdlrm
policycoreutils_default_encoding-0.1-py2.6.egg-info3000644editdlrm
psutil-0.7.0-py2.6.egg-info98940644editdlrm
pycurl-7.19.0-py2.6.egg-info3660644editdlrm
pycurl.so695040755editdlrm
pygpgme-0.1-py2.6.egg-info8360644editdlrm
pygtk.pth80644editdlrm
pygtk.py29660644editdlrm
pygtk.pyc20820644editdlrm
pygtk.pyo17890644editdlrm
pylab.py900644editdlrm
pylab.pyc2420644editdlrm
pylab.pyo2420644editdlrm
pylve.so195520755editdlrm
python_dmidecode-3.10.15-py2.6.egg-info3110644editdlrm
README1190644editdlrm
semanage.py414340644editdlrm
semanage.pyc527670644editdlrm
semanage.pyo527670644editdlrm
seobject.py807580755editdlrm
seobject.pyc799670644editdlrm
seobject.pyo799670644editdlrm
setools-1.0-py2.6.egg-info2060644editdlrm
snack.py306430644editdlrm
snack.pyc407570644editdlrm
snack.pyo407570644editdlrm
sqlitecachec.py25100644editdlrm
sqlitecachec.pyc21760644editdlrm
sqlitecachec.pyo21760644editdlrm
yum_metadata_parser-1.1.2-py2.6.egg-info2130644editdlrm
_audit.so1520640755editdlrm
_cffi_backend.so3862130644editdlrm
_dbus_bindings.so1540320644editdlrm
_dbus_glib_bindings.so83840644editdlrm
_mysql.so1398270644editdlrm
_mysql_exceptions.py23520644editdlrm
_mysql_exceptions.pyc42570644editdlrm
_psutil_linux.so89680644editdlrm
_psutil_posix.so55760644editdlrm
_semanage.so2253840644editdlrm
_snackmodule.so355040755editdlrm
_sqlitecache.so453200644editdlrm
_yaml.so1861760644editdlrm
Edit: /usr/lib64/python2.6/site-packages/abrt_exception_handler.py (7077B)
#:mode=python: # -*- coding: utf-8 -*- ## Copyright (C) 2001-2005 Red Hat, Inc. ## Copyright (C) 2001-2005 Harald Hoyer ## Copyright (C) 2009 Jiri Moskovcak ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ Module for the ABRT exception handling hook """ import sys import os def write_dump(tb): if sys.argv[0][0] == "/": executable = os.path.abspath(sys.argv[0]) else: # We don't know the path. # (BTW, we *can't* assume the script is in current directory.) executable = sys.argv[0] # Open ABRT daemon's socket and write data to it try: import socket s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) s.settimeout(5) try: s.connect("/var/run" + "/abrt/abrt.socket") s.sendall("PUT / HTTP/1.1\r\n\r\n") s.sendall("PID=%s\0" % os.getpid()) s.sendall("EXECUTABLE=%s\0" % executable) s.sendall("ANALYZER=Python\0") s.sendall("TYPE=Python\0") s.sendall("BASENAME=pyhook\0") # This handler puts a short(er) crash descr in 1st line of the backtrace. # Example: # CCMainWindow.py:1::ZeroDivisionError: integer division or modulo by zero s.sendall("REASON=%s\0" % tb.splitlines()[0]) s.sendall("BACKTRACE=%s\0" % tb) s.shutdown(socket.SHUT_WR) # Read the response and log if there's anything wrong response = "" while True: buf = s.recv(256) if not buf: break response += buf except socket.timeout, ex: import syslog syslog.syslog("communication with ABRT daemon failed: %s" % str(ex)) s.close() parts = response.split() if (len(parts) < 2 or (not parts[0].startswith("HTTP/")) or (not parts[1].isdigit()) or (int(parts[1]) >= 400)): import syslog syslog.syslog("error sending data to ABRT daemon: %s" % response) except Exception, ex: import syslog syslog.syslog("can't communicate with ABRT daemon, is it running? %s" % str(ex)) def conf_enabled(var_name): try: conf = problem.load_plugin_conf_file("python.conf") except: return -1 else: conf.get(var_name, -1) def handleMyException((etype, value, tb)): """ The exception handling function. progname - the name of the application version - the version of the application """ try: # Restore original exception handler sys.excepthook = sys.__excepthook__ # pylint: disable-msg=E1101 import errno # Ignore Ctrl-C # SystemExit rhbz#636913 -> this exception is not an error if etype in [KeyboardInterrupt, SystemExit]: return sys.__excepthook__(etype, value, tb) # Ignore EPIPE: it happens all the time # Testcase: script.py | true, where script.py is: ## #!/usr/bin/python ## import os ## import time ## time.sleep(1) ## os.write(1, "Hello\n") # print "Hello" wouldn't be the same # if etype == IOError or etype == OSError: if value.errno == errno.EPIPE: return sys.__excepthook__(etype, value, tb) import syslog syslog.openlog("abrt") # Ignore interactive Python and similar # Check for first "-" is meant to catch "-c" which appears in this case: ## $ python -c 'import sys; print "argv0 is:%s" % sys.argv[0]' ## argv0 is:-c # Are there other cases when sys.argv[0][0] is "-"? if not sys.argv[0] or sys.argv[0][0] == "-": syslog.syslog("detected unhandled Python exception") raise Exception # Ignore scripts with relative path unless "RequireAbsolutePath = no". # (In this case we can't reliably determine package) syslog.syslog("detected unhandled Python exception in '%s'" % sys.argv[0]) if sys.argv[0][0] != "/": if conf_enabled("RequireAbsolutePath") != 0: raise Exception import traceback elist = traceback.format_exception(etype, value, tb) if tb != None and etype != IndentationError: tblast = traceback.extract_tb(tb, limit=None) if len(tblast): tblast = tblast[len(tblast)-1] extxt = traceback.format_exception_only(etype, value) if tblast and len(tblast) > 3: ll = [] ll.extend(tblast[:3]) ll[0] = os.path.basename(tblast[0]) tblast = ll ntext = "" for t in tblast: ntext += str(t) + ":" text = ntext text += extxt[0] text += "\n" text += "".join(elist) trace = tb while trace.tb_next: trace = trace.tb_next frame = trace.tb_frame text += ("\nLocal variables in innermost frame:\n") try: for (key, val) in frame.f_locals.items(): text += "%s: %s\n" % (key, repr(val)) except: pass else: text = str(value) + "\n" text += "\n" text += "".join(elist) # Send data to the daemon write_dump(text) except: # Silently ignore any error in this hook, # to not interfere with other scripts pass return sys.__excepthook__(etype, value, tb) def installExceptionHandler(): """ Install the exception handling function. """ sys.excepthook = lambda etype, value, tb: handleMyException((etype, value, tb)) # install the exception handler when the abrt_exception_handler # module is imported try: installExceptionHandler() except Exception, e: # TODO: log errors? # OTOH, if abrt is deinstalled uncleanly # and this file (sitecustomize.py) exists but # abrt_exception_handler module does not exist, we probably # don't want to irritate admins... pass if __name__ == '__main__': # test exception raised to show the effect div0 = 1 / 0 # pylint: disable-msg=W0612 sys.exit(0) __author__ = "Harald Hoyer "