From b209008cf64405cf338d004e97b25a3208541080 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 8 Sep 2013 11:39:51 +0200 Subject: Changed the confirmation message when a new feed has been added. --- source/pyAggr3g470r.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/pyAggr3g470r.py') diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 956402ce..bec7a9fe 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -490,10 +490,14 @@ class pyAggr3g470r(object): else: result = utils.add_feed(feed_url) # if the feed is not in the file feed.lst + import hashlib + sha1_hash = hashlib.sha1() + sha1_hash.update(feed_url.encode('utf-8')) + feed_id = sha1_hash.hexdigest() if result is False: - message = "

You are already following this feed!

" + message = """

You are already following this feed!

""" % (feed_id,) else: - message = """

Feed added. You can now fetch your feeds.

""" + message = """

Feed added. You can now fetch your feeds.

""" % (feed_id,) tmpl = lookup.get_template("confirmation.html") return tmpl.render(message=message) -- cgit