aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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