diff options
Diffstat (limited to 'Examples/test-suite/python/threads_exception_runme.py')
-rw-r--r-- | Examples/test-suite/python/threads_exception_runme.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Examples/test-suite/python/threads_exception_runme.py b/Examples/test-suite/python/threads_exception_runme.py index d4b8855fc..6fe6947ec 100644 --- a/Examples/test-suite/python/threads_exception_runme.py +++ b/Examples/test-suite/python/threads_exception_runme.py @@ -20,15 +20,16 @@ except RuntimeError,e: # This is expected fail with -builtin option # Throwing builtin classes as exceptions not supported -try: - t.hosed() -except threads_exception.Exc,e: - code = e.code - if code != 42: - raise RuntimeError, "bad... code: %d" % code - msg = e.msg - if msg != "Hosed": - raise RuntimeError, "bad... msg: '%s' len: %d" % (msg, len(msg)) +if not threads_exception.is_python_builtin(): + try: + t.hosed() + except threads_exception.Exc,e: + code = e.code + if code != 42: + raise RuntimeError, "bad... code: %d" % code + msg = e.msg + if msg != "Hosed": + raise RuntimeError, "bad... msg: '%s' len: %d" % (msg, len(msg)) for i in range(1,4): try: |