Skip to content

Commit 777d486

Browse files
Fix with python3.12 (slgobinath#544)
imp is deprecated in 3.4 and removed in 3.12. this caused safe eyes to break on upgrading to fedora 39 Signed-off-by: Alyssa Rosenzweig <[email protected]>
1 parent cbfc0cc commit 777d486

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

safeeyes/utility.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"""
2222

2323
import errno
24-
import imp
2524
import inspect
2625
import importlib
2726
import json
@@ -355,7 +354,7 @@ def module_exist(module):
355354
Check wther the given Python module exists or not.
356355
"""
357356
try:
358-
imp.find_module(module)
357+
importlib.util.find_spec(module)
359358
return True
360359
except ImportError:
361360
return False

0 commit comments

Comments
 (0)