aboutsummaryrefslogtreecommitdiff
path: root/source/pyAggr3g470r.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-27 16:51:01 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-27 16:51:01 +0100
commit74151c9cfdc4dfe52f54fedc8de070adaaf6880d (patch)
treea57cc903ca505d7a32746c126c74443f51a0b3df /source/pyAggr3g470r.py
parentMail are now encoded with utf-8 (plain and html). (diff)
downloadnewspipe-74151c9cfdc4dfe52f54fedc8de070adaaf6880d.tar.gz
newspipe-74151c9cfdc4dfe52f54fedc8de070adaaf6880d.tar.bz2
newspipe-74151c9cfdc4dfe52f54fedc8de070adaaf6880d.zip
Test if success when changing the URL of a feed.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-xsource/pyAggr3g470r.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 2e8f4c8a..db67d384 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -493,9 +493,14 @@ class pyAggr3g470r(object):
Enables to change the URL of a feed already present in the database.
"""
self.mongo.update_feed(feed_id, {"feed_link":new_feed_url})
- utils.change_feed_url(old_feed_url, new_feed_url)
- tmpl = lookup.get_template("confirmation.html")
- return tmpl.render(message="<p>The URL of the feed has been changed.</p>")
+ result = utils.change_feed_url(old_feed_url, new_feed_url)
+ if result:
+ tmpl = lookup.get_template("confirmation.html")
+ message = "<p>The URL of the feed has been changed.</p>"
+ else:
+ tmpl = lookup.get_template("error.html")
+ message = "<p>Error when changing the URL of the feed.</p>"
+ return tmpl.render(message=message)
change_feed_url.exposed = True
bgstack15