Skip to content

Commit

Permalink
Fix Torrenting provider exception when offline (#6430)
Browse files Browse the repository at this point in the history
* Fix Torrenting provider exception when offline

Fixes #3876 (comment)

* Update CHANGELOG.md
  • Loading branch information
medariox authored and p0psicles committed Mar 31, 2019
1 parent 0b8f0b4 commit 9e9fb07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#### Fixes
- Fixed lists not being saved when used with comma separated items ([#6428](https://github.com/pymedusa/Medusa/pull/6428))
- Fixed extra scripts running with Python 3 ([#6428](https://github.com/pymedusa/Medusa/pull/6428))
- Fixed Torrenting provider exception when offline ([#6430](https://github.com/pymedusa/Medusa/pull/6430))

## 0.3.1 (2019-03-20)

Expand Down
3 changes: 1 addition & 2 deletions medusa/providers/torrent/html/torrenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ def parse(self, data, mode):

with BS4Parser(data, 'html5lib') as html:
torrent_table = html.find('table', {'id': 'torrentsTable'})
if torrent_table:
torrent_rows = torrent_table.find_all('tr')
torrent_rows = torrent_table.find_all('tr') if torrent_table else []

# Continue only if at least one release is found
if len(torrent_rows) < 2:
Expand Down

0 comments on commit 9e9fb07

Please sign in to comment.