From eb49d303ad63581c453fab56c95ed4cfc9065a26 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Sat, 6 Dec 2014 12:37:57 +0100 Subject: [PATCH] Convert hash to upper. --- headphones/searcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 5c1765b0..c3f3667f 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -128,7 +128,8 @@ def read_torrent_name(torrent_file, default_name=None): def calculate_torrent_hash(link, data=None): """ - Calculate the torrent hash from a magnet link or data. + Calculate the torrent hash from a magnet link or data. Raises a ValueError + when it cannot create a torrent hash given the input data. """ if link.startswith("magnet:"): @@ -142,7 +143,7 @@ def calculate_torrent_hash(link, data=None): raise ValueError("Cannot calculate torrent hash without magnet link " \ "or data") - return torrent_hash + return torrent_hash.upper() def get_seed_ratio(provider):