This commit is contained in:
missionfloyd 2023-12-03 21:26:12 -07:00 committed by GitHub
parent 639ccf254b
commit 06725af40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -120,12 +120,12 @@ def run(command, desc=None, errdesc=None, custom_env=None, live: bool = default_
def is_installed(package):
try:
dist = importlib.metadata.distribution(package)
dist = importlib.metadata.distribution(package)
except importlib.metadata.PackageNotFoundError:
try:
try:
spec = importlib.util.find_spec(package)
except ModuleNotFoundError:
return False
return False
return spec is not None