mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Raise error if processing without a loaded config
This commit is contained in:
parent
7d20a40d5a
commit
cace1271ae
6 changed files with 12 additions and 0 deletions
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
|
@ -44,6 +44,8 @@ def process(
|
||||||
failure_link: str = '',
|
failure_link: str = '',
|
||||||
) -> ProcessResult:
|
) -> ProcessResult:
|
||||||
# Get configuration
|
# Get configuration
|
||||||
|
if core.CFG is None:
|
||||||
|
raise RuntimeError('Configuration not loaded.')
|
||||||
cfg = core.CFG[section][input_category]
|
cfg = core.CFG[section][input_category]
|
||||||
|
|
||||||
# Base URL
|
# Base URL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue