From 34236e8960802ec98cbe864a103fc8bcae315379 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 25 Nov 2022 10:47:40 -0500 Subject: [PATCH] Streamline `core.processor.nzbget.parse_status` --- core/processor/nzbget.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/core/processor/nzbget.py b/core/processor/nzbget.py index 5a8358f6..049674bc 100644 --- a/core/processor/nzbget.py +++ b/core/processor/nzbget.py @@ -72,21 +72,13 @@ def _parse_health_status(): def parse_status(): - status = 0 - # Check if the script is called from nzbget 13.0 or later - if 'NZBPP_TOTALSTATUS' in os.environ: + if 'NZBPP_TOTALSTATUS' in os.environ: # Called from nzbget 13.0 or later status = _parse_total_status() else: - # Check par status par_status = _parse_par_status() - - # Check unpack status unpack_status = _parse_unpack_status() - - # Check download health health_status = _parse_health_status() - - return par_status or unpack_status or health_status or status + status = par_status or unpack_status or health_status return status