Fix with python3.12 (#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 <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2023-11-30 14:01:58 -04:00 committed by GitHub
parent cbfc0cc133
commit 777d48603d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -21,7 +21,6 @@ This module contains utility functions for Safe Eyes and its plugins.
""" """
import errno import errno
import imp
import inspect import inspect
import importlib import importlib
import json import json
@ -355,7 +354,7 @@ def module_exist(module):
Check wther the given Python module exists or not. Check wther the given Python module exists or not.
""" """
try: try:
imp.find_module(module) importlib.util.find_spec(module)
return True return True
except ImportError: except ImportError:
return False return False