summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/director_exception_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/director_exception_runme.py')
-rw-r--r--Examples/test-suite/python/director_exception_runme.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/Examples/test-suite/python/director_exception_runme.py b/Examples/test-suite/python/director_exception_runme.py
index 510845a5a..de3ef22a5 100644
--- a/Examples/test-suite/python/director_exception_runme.py
+++ b/Examples/test-suite/python/director_exception_runme.py
@@ -68,14 +68,13 @@ if not ok:
# This is expected to fail with -builtin option
# Throwing builtin classes as exceptions not supported
-try:
- raise Exception2()
-except Exception2:
- pass
+if not is_python_builtin():
+ try:
+ raise Exception2()
+ except Exception2:
+ pass
-# This is expected to fail with -builtin option
-# Throwing builtin classes as exceptions not supported
-try:
- raise Exception1()
-except Exception1:
- pass
+ try:
+ raise Exception1()
+ except Exception1:
+ pass