mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-17 18:02:48 +00:00
refactor: deduplicate yaml import pattern via require_yaml()
This commit is contained in:
parent
3c7fc26354
commit
b4c5d77e4b
8 changed files with 28 additions and 44 deletions
|
|
@ -18,14 +18,10 @@ import os
|
|||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
import yaml
|
||||
except ImportError:
|
||||
print("Error: PyYAML required (pip install pyyaml)", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from common import list_registered_platforms, load_database, load_emulator_profiles, load_platform_config
|
||||
from common import list_registered_platforms, load_database, load_emulator_profiles, load_platform_config, require_yaml
|
||||
|
||||
yaml = require_yaml()
|
||||
|
||||
DEFAULT_EMULATORS_DIR = "emulators"
|
||||
DEFAULT_PLATFORMS_DIR = "platforms"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue