Nicer error log when no URLs provided for CLI feeder - don't need the stacktrace

This commit is contained in:
Patrick Robertson
2025-03-17 09:34:33 +00:00
parent 99e9ac2465
commit 0ec5451f66
2 changed files with 4 additions and 2 deletions

View File

@@ -2,13 +2,14 @@ from loguru import logger
from auto_archiver.core.feeder import Feeder
from auto_archiver.core.metadata import Metadata
from auto_archiver.core.consts import SetupError
class CLIFeeder(Feeder):
def setup(self) -> None:
self.urls = self.config["urls"]
if not self.urls:
raise ValueError(
raise SetupError(
"No URLs provided. Please provide at least one URL via the command line, or set up an alternative feeder. Use --help for more information."
)