archive
/
md-pdf
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf/md_pdf/config/validate.py

20 lines
397 B
Python

from md_pdf.exceptions import ConfigValidationException
REQUIRED_KEYS = [
'output',
'input'
]
def check_required_keys(config):
missing_keys = [key for key in REQUIRED_KEYS if key not in config]
if missing_keys:
raise ConfigValidationException("Missing required keys: {}".format(", ".join(missing_keys)))
def validate_config(config):
check_required_keys(config)