aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-03-13 18:19:07 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-03-13 18:19:07 +0100
commitf135ace61d394b38b810b3f26816028eca96be70 (patch)
tree42b7a656b9a6ab8aaa5368bfba0a1b022e67a42c /source
parentUpdated revision date for pyaggr3g470r.py. (diff)
downloadnewspipe-f135ace61d394b38b810b3f26816028eca96be70.tar.gz
newspipe-f135ace61d394b38b810b3f26816028eca96be70.tar.bz2
newspipe-f135ace61d394b38b810b3f26816028eca96be70.zip
Handle exception in change_feed_name().
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 5f967cbc..36780da2 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -552,9 +552,14 @@ class pyAggr3g470r(object):
"""
Enables to change the name of a feed.
"""
- self.mongo.update_feed(feed_id, {"feed_title":new_feed_name})
- tmpl = lookup.get_template("confirmation.html")
- return tmpl.render(message="<p>The name of the feed has been changed.</p>")
+ try:
+ self.mongo.update_feed(feed_id, {"feed_title":new_feed_name})
+ tmpl = lookup.get_template("confirmation.html")
+ message = "<p>The name of the feed has been changed.</p>"
+ except:
+ tmpl = lookup.get_template("error.html")
+ message = "<p>Error when changing the nameL of the feed.</p>"
+ return tmpl.render(message=message)
change_feed_name.exposed = True
bgstack15