Extract param only when not a fork_obj

* Directly return process_result from api_call()
This commit is contained in:
p0psicles 2021-02-15 17:08:54 +01:00
commit b5c7723020

View file

@ -196,6 +196,9 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
init_sickbeard.fork_obj.initialize(dir_name, input_name, failed, client_agent='manual')
# configure SB params to pass
# We don't want to remove params, for the Forks that have been refactored.
# As we don't want to duplicate this part of the code.
if not init_sickbeard.fork_obj:
fork_params['quiet'] = 1
fork_params['proc_type'] = 'manual'
if input_name is not None:
@ -323,7 +326,7 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
try:
if section == 'SickBeard':
if init_sickbeard.fork_obj:
r = init_sickbeard.fork_obj.api_call()
return init_sickbeard.fork_obj.api_call()
else:
s = requests.Session()