mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
fix: stop on one line when pyyaml is missing
This commit is contained in:
1 parent
eef13547e1
commit
7be8a7cd7b
7 files changed
+22
-30
No files matched your search
@@ -15,11 +15,6 @@ import zipfile
|
||||
from collections.abc import Callable, Iterator
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
import yaml
|
||||
except ImportError:
|
||||
yaml = None
|
||||
|
||||
from core.artifacts import file_lock as _file_lock, set_plain_mode
|
||||
from core.cli import InputMissing
|
||||
from core.github import github_token
|
||||
@@ -41,8 +36,6 @@ _TRANSIENT = (urllib.error.URLError, OSError, tarfile.TarError, zipfile.BadZipFi
|
||||
|
||||
|
||||
def load_registry(registry_path: str = DEFAULT_REGISTRY) -> dict[str, dict]:
|
||||
if yaml is None:
|
||||
raise ImportError("PyYAML required: pip install pyyaml")
|
||||
path = Path(registry_path)
|
||||
if not path.exists():
|
||||
raise InputMissing(f"Registry not found: {registry_path}")
|
||||
|
||||
Reference in new issue
Block a user