From 5ae74640116649ca46f847edc208590c63d2bd25 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 8 Feb 2019 16:03:55 +0000 Subject: [PATCH] core: cProfile is not available in 2.4. --- mitogen/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mitogen/core.py b/mitogen/core.py index 602b84d8..3694342c 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -36,7 +36,6 @@ bootstrap implementation sent to every new slave context. import binascii import collections -import cProfile import encodings.latin_1 import errno import fcntl @@ -64,6 +63,11 @@ import imp # Absolute imports for <2.5. select = __import__('select') +try: + import cProfile +except ImportError: + cProfile = None + try: import thread except ImportError: