Browse Source

Remove some redundant ifs (#1791)

pull/1794/head
puzzledsab 4 years ago
committed by GitHub
parent
commit
10c56e08d4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      sabnzbd/nzbstuff.py

5
sabnzbd/nzbstuff.py

@ -171,20 +171,17 @@ class Article(TryList):
if log:
logging.debug("Article %s | Server: %s | in second if", self.article, server.host)
# Is the current selected server of the same priority as this article?
if log:
logging.debug(
"Article %s | Server: %s | Article priority: %s", self.article, server.host, self.fetcher_priority
)
if log:
logging.debug(
"Article %s | Server: %s | Server priority: %s", self.article, server.host, server.priority
)
if server.priority == self.fetcher_priority:
if log:
logging.debug("Article %s | Server: %s | same priority, use it", self.article, server.host)
self.fetcher = server
self.tries += 1
if log:
logging.debug("Article %s | Server: %s | same priority, use it", self.article, server.host)
logging.debug("Article %s | Server: %s | Article-try: %s", self.article, server.host, self.tries)
return self
else:

Loading…
Cancel
Save