fix: stop on one line when pyyaml is missing

This commit is contained in:
Abdessamad Derraz committed 2026-11-21 05:59:51 +01:00
1 parent eef13547e1
commit 7be8a7cd7b
7 files changed
+22 -30

No files matched your search

+6 -2
View File
@@ -12,7 +12,6 @@ import time
import urllib.error
import urllib.request
import yaml
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from pathlib import Path
@@ -21,7 +20,12 @@ from typing import Any, Callable, NoReturn, Protocol, TypeVar
from core.github import github_token
from core.artifacts import copy_stream_atomic, write_text_atomic
from core.upstream import forge_headers as upstream_headers
from model.safeparse import yaml_load
from model.safeparse import require_yaml, yaml_load
try:
import yaml
except ImportError:
require_yaml() # exits with the install hint
@dataclass