Add suppression of error

This commit is contained in:
Clinton Hall 2020-10-15 21:47:49 +13:00 committed by GitHub
commit f339d2f5b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
remote_path = int(cfg.get('remote_path', 0)) remote_path = int(cfg.get('remote_path', 0))
protocol = 'https://' if ssl else 'http://' protocol = 'https://' if ssl else 'http://'
omdbapikey = cfg.get('omdbapikey', '') omdbapikey = cfg.get('omdbapikey', '')
no_status_check = int(cfg.get('no_status_check', 0))
status = int(status) status = int(status)
if status > 0 and core.NOEXTRACTFAILED: if status > 0 and core.NOEXTRACTFAILED:
extract = 0 extract = 0
@ -465,6 +466,11 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
'{0} does not appear to have changed status after {1} minutes, Please check your logs.'.format(input_name, wait_for), '{0} does not appear to have changed status after {1} minutes, Please check your logs.'.format(input_name, wait_for),
section, section,
) )
if no_status_check:
return ProcessResult(
status_code=0,
message='{0}: Successfully processed but no change in status confirmed'.format(section),
)
return ProcessResult( return ProcessResult(
status_code=1, status_code=1,
message='{0}: Failed to post-process - No change in status'.format(section), message='{0}: Failed to post-process - No change in status'.format(section),