Skip to content

Commit

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

0 comments on commit d1e4aab

Please sign in to comment.