aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-03-13 18:21:14 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-03-13 18:21:14 +0100
commit03824b2e45b12409a06be6b89c6fc6ee9d75e0e5 (patch)
tree78ec076b99d41e54320907d0b8c1baf1d5d68719 /source
parentHandle exception in change_feed_name(). (diff)
downloadnewspipe-03824b2e45b12409a06be6b89c6fc6ee9d75e0e5.tar.gz
newspipe-03824b2e45b12409a06be6b89c6fc6ee9d75e0e5.tar.bz2
newspipe-03824b2e45b12409a06be6b89c6fc6ee9d75e0e5.zip
Handle exception in change_feed_logo().
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 36780da2..e30c82f5 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -568,9 +568,14 @@ class pyAggr3g470r(object):
"""
Enables to change the name of a feed.
"""
- self.mongo.update_feed(feed_id, {"feed_image":new_feed_logo})
- tmpl = lookup.get_template("confirmation.html")
- return tmpl.render(message="<p>The logo of the feed has been changed.</p>")
+ try:
+ self.mongo.update_feed(feed_id, {"feed_image":new_feed_logo})
+ tmpl = lookup.get_template("confirmation.html")
+ message = "<p>The logo of the feed has been changed.</p>"
+ except:
+ tmpl = lookup.get_template("error.html")
+ message = "<p>Error when changing the logo of the feed.</p>"
+ return tmpl.render(message=message)
change_feed_logo.exposed = True
bgstack15