aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/utils/timing.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils/timing.py')
-rw-r--r--contrib/python/ipython/py3/IPython/utils/timing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/utils/timing.py b/contrib/python/ipython/py3/IPython/utils/timing.py
index 3a181ae728..d87e5fa8ef 100644
--- a/contrib/python/ipython/py3/IPython/utils/timing.py
+++ b/contrib/python/ipython/py3/IPython/utils/timing.py
@@ -23,8 +23,8 @@ import time
# If possible (Unix), use the resource module instead of time.clock()
try:
import resource
-except ImportError:
- resource = None
+except ModuleNotFoundError:
+ resource = None # type: ignore [assignment]
# Some implementations (like jyputerlite) don't have getrusage
if resource is not None and hasattr(resource, "getrusage"):