Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions safeeyes/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,9 @@ def command_exist(command):


def module_exist(module):
"""Check wther the given Python module exists or not."""
try:
importlib.util.find_spec(module)
return True
except ImportError:
return False
"""Check whether the given Python module exists or not."""
module_spec = importlib.util.find_spec(module)
return module_spec is not None


def merge_configs(new_config, old_config):
Expand Down