add more error logs when missing required fields

pull/21/head
Leonardo Merza 4 years ago
parent de5e1d33aa
commit a61a166958

@ -161,8 +161,8 @@ To filter by profile in docker use `ARR_A_PROFILE_FILTER` or `ARR_A_PROFILE_FILT
* Install requirements.txt
*
---
## Debugging
If you need to debug syncarr then you can either set the log level through the config file:
## Troubleshooting
If you need to troubleshoot syncarr, then you can either set the log level through the config file:
```ini
[general]

@ -185,7 +185,6 @@ elif sonarrA_url and sonarrB_url:
########################################################################################################################
logger.debug({
'instanceA_url': instanceA_url,
'instanceA_key': instanceA_key,
@ -199,10 +198,21 @@ logger.debug({
'is_lidarr': is_lidarr,
})
assert instanceA_url
assert instanceA_key
assert instanceB_url
assert instanceB_key
if not instanceA_url:
logger.error('missing URL for instance A')
sys.exit(0)
if not instanceA_key:
logger.error('missing API key for instance A')
sys.exit(0)
if not instanceA_url:
logger.error('missing URL for instance B')
sys.exit(0)
if not instanceB_key:
logger.error('missing API key for instance B')
sys.exit(0)
assert api_content_path
assert api_search_path

@ -2,8 +2,8 @@ import os
import configparser
DEV = os.environ.get('DEV', True)
VER = '1.4.0'
DEV = os.environ.get('DEV', False)
VER = '1.4.1'
def ConfigSectionMap(section):

Loading…
Cancel
Save