summaryrefslogtreecommitdiffstats
path: root/libreport/src/report-python/libreport-meh-test.py
blob: 4ef248347378e730453a945a14b496281adc0947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/env python

from meh.dump import ReverseExceptionDump
from meh.handler import *
from meh.ui.gui import *

class Config:
      def __init__(self):
          self.programName = "abrt"
          self.programVersion = "2.0"
          self.attrSkipList = []
          self.fileList = []
          self.config_value_one = 1
          self.config_value_two = 2



#meh.makeRHHandler("crash-test-meh", "1.0", Config())
config = Config()
intf = GraphicalIntf(None)
handler = ExceptionHandler(config, intf, ReverseExceptionDump)
handler.install(None)


print "handler set up, about to divide by zero"

zero = 0
print 1 / zero

print "should have crashed"