We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b193551 + 65ee965 commit 331a073Copy full SHA for 331a073
safeeyes/utility.py
@@ -362,12 +362,9 @@ def command_exist(command):
362
363
364
def module_exist(module):
365
- """Check wther the given Python module exists or not."""
366
- try:
367
- importlib.util.find_spec(module)
368
- return True
369
- except ImportError:
370
- return False
+ """Check whether the given Python module exists or not."""
+ module_spec = importlib.util.find_spec(module)
+ return module_spec is not None
371
372
373
def merge_configs(new_config, old_config):
0 commit comments