Skip to content

Commit

Permalink
Trackers handling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Nov 21, 2023
1 parent dc193d0 commit cfc5170
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -2537,19 +2537,18 @@ def process_torrents(self):
self._temp_overseer_request_cache = defaultdict(set)
return self._temp_overseer_request_cache
except qbittorrentapi.exceptions.APIError as e:
self.logger.error("The qBittorrent API returned an unexpected error")
exceptionstr = str(e)
if (
exceptionstr.find("JSONDecodeError") != 0
or exceptionstr.find("AttributeError") != 0
):
self.logger.info("Torrent still connecting to trackers")
else:
self.logger.error("The qBittorrent API returned an unexpected error")
self.logger.debug("Unexpected APIError from qBitTorrent", exc_info=e)
raise DelayLoopException(length=300, type="qbit")
raise DelayLoopException(length=300, type="qbit")
except (AttributeError, JSONDecodeError):
self.logger.info("Torrent still connecting to trackers")
raise DelayLoopException(length=300, type="qbit")
except DelayLoopException:
raise
except KeyboardInterrupt:
Expand Down

0 comments on commit cfc5170

Please sign in to comment.