Skip to content

Commit

Permalink
Changed error output when Transmission is not responding
Browse files Browse the repository at this point in the history
  • Loading branch information
archangelic committed Sep 23, 2016
1 parent 72eb85b commit 20853d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cistern/cistern.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def refresh_feed(feed, downloaded=False):

def cistern():
click.clear()
failed_torrents = []
for feed in Feed.select().where(Feed.enabled == True):
refresh_feed(feed)
click.echo('Downloading torrents:')
Expand All @@ -113,9 +114,13 @@ def cistern():
tremote.add_torrent(torrent.url, **transmission_args)
torrent.set_downloaded()
except transmissionrpc.error.TransmissionError:
click.echo("Saving " + torrent.name + " for later")
failed_torrents.append(torrent.name)
else:
click.echo("No torrents to download in this feed")
if failed_torrents:
click.echo("Failed to download torrents. Saving to download later:", err=True)
for torrent_name in failed_torrents:
click.echo(torrent_name, err=True)


# COMMAND LINE
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

setup(
name="cistern",
version="0.1.2",
version="0.1.3",
license="MIT",
url="https://github.com/archangelic/cistern",
description="Command line tool for downloading torrents from RSS feeds.",
author="Michael Hancock",
author_email="[email protected]",
download_url=(
"https://github.com/archangelic/cistern/archive/v0.1.2.tar.gz"
"https://github.com/archangelic/cistern/archive/v0.1.3.tar.gz"
),
install_requires=[
'click',
Expand Down

0 comments on commit 20853d9

Please sign in to comment.