mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 11:38:30 -07:00
fixed crash (with no error code) when no section. fixes #390
This commit is contained in:
parent
f627ddec9b
commit
ade9e60a8b
2 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,12 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
|
||||
# auto-detect section
|
||||
section = nzbtomedia.CFG.findsection(inputCategory).isenabled()
|
||||
if section is None:
|
||||
logger.error(
|
||||
'Category:[%s] is not defined or is not enabled. Please rename it or ensure it is enabled for teh appropriate section in your autoProcessMedia.cfg and try again.' % (
|
||||
inputCategory))
|
||||
return -1
|
||||
|
||||
if len(section) > 1:
|
||||
logger.error(
|
||||
'Category:[%s] is not unique, %s are using it. Please rename it or disable all other sections using the same category name in your autoProcessMedia.cfg and try again.' % (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue