6eb88b1
commit ea4d6a12548eea7ce0424feea13a499fb7085e96
6eb88b1
Author: rpm-build <rpm-build>
6eb88b1
Date:   Wed Mar 29 04:31:55 2017 +0200
6eb88b1
6eb88b1
    011-no-faulthandler.patch
6eb88b1
6eb88b1
diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py
6eb88b1
index 5d7f308..4424637 100644
6eb88b1
--- a/lib-python/3/test/support/__init__.py
6eb88b1
+++ b/lib-python/3/test/support/__init__.py
6eb88b1
@@ -6,7 +6,6 @@ if __name__ != 'test.support':
6eb88b1
 import collections.abc
6eb88b1
 import contextlib
6eb88b1
 import errno
6eb88b1
-import faulthandler
6eb88b1
 import fnmatch
6eb88b1
 import functools
6eb88b1
 import gc
6eb88b1
@@ -65,6 +64,11 @@ try:
6eb88b1
 except ImportError:
6eb88b1
     resource = None
6eb88b1
 
6eb88b1
+try:
6eb88b1
+    import faulthandler
6eb88b1
+except ImportError:
6eb88b1
+    faulthandler = None
6eb88b1
+
6eb88b1
 __all__ = [
6eb88b1
     # globals
6eb88b1
     "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast",
6eb88b1
@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None):
6eb88b1
         finally:
6eb88b1
             started = [t for t in started if t.isAlive()]
6eb88b1
             if started:
6eb88b1
-                faulthandler.dump_traceback(sys.stdout)
6eb88b1
+                if faulthandler is not None:
6eb88b1
+                    faulthandler.dump_traceback(sys.stdout)
6eb88b1
                 raise AssertionError('Unable to join %d threads' % len(started))
6eb88b1
 
6eb88b1
 @contextlib.contextmanager