diff options
| author | Karel Klic <kklic@redhat.com> | 2009-10-22 13:45:41 +0200 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2009-10-22 13:45:41 +0200 |
| commit | 951fcd8e9289b285bf4a2e3f2a0cc2cc49620cd7 (patch) | |
| tree | 8effb8628a3cf6c5592b3bd32ea4d6e12c79f498 /src/Hooks/sitecustomize.py | |
| parent | 6c8c8f960302d9e94a820c82eeb41b3f19af2ec1 (diff) | |
Initial implementation of abrt-pyhook-helper
Diffstat (limited to 'src/Hooks/sitecustomize.py')
| -rw-r--r-- | src/Hooks/sitecustomize.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Hooks/sitecustomize.py b/src/Hooks/sitecustomize.py index 56c6669..32a3747 100644 --- a/src/Hooks/sitecustomize.py +++ b/src/Hooks/sitecustomize.py @@ -1,14 +1,16 @@ +# ABRT crash hook +# # This special script is placed in # /usr/local/lib/pythonNNN/site-packages/sitecustomize.py # and python interpreter runs it automatically everytime -# some python script is executed +# some python script is executed. config = None conf = {} try: config = open("/etc/abrt/pyhook.conf","r") except: - #silently ignore if file doesn't exist + # Silently ignore if file doesn't exist. pass try: @@ -20,10 +22,14 @@ try: line = config.readline().lower().replace(' ','').strip('\n').split('=') conf[line[0]] = line[1] except: - # ignore silently everything, because we don't want to bother user if this hook doesn't work + # Ignore silently everything, because we don't want to bother user + # if this hook doesn't work. pass if conf.has_key("enabled"): + # Prevent abrt exception handler from running when the abrtd daemon is + # not active. + # abrtd sets the value to "no" when deactivated and vice versa. if conf["enabled"] == "yes": try: from abrt_exception_handler import * |
