]> git.openstreetmap.org Git - osqa.git/commitdiff
Moves the try clause up a bit in the ui renderer to catch possible exceptions before...
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 2 Sep 2010 01:28:10 +0000 (01:28 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 2 Sep 2010 01:28:10 +0000 (01:28 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@583 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/templatetags/ui_registry.py

index 1e76972e811577510312e2e8f92ec8d31549bbda..02d90ea22a2e6a02212269cd7796b54a8786e6c3 100644 (file)
@@ -15,16 +15,16 @@ class LoadRegistryNode(template.Node):
         result = ''
 
         for ui_object in self.registry:
-            if ui_object.can_render(context):
-                try:
-                    if result:
-                        result += separator
-                    result += ui_object.render(context)
-                except Exception, e:
-                    import traceback
-                    logging.error("Exception %s rendering ui objects %s: \n%s" % (
-                        e, ui_object, traceback.format_exc()
-                    ))
+            try:
+                if ui_object.can_render(context):
+                        if result:
+                            result += separator
+                        result += ui_object.render(context)
+            except Exception, e:
+                import traceback
+                logging.error("Exception %s rendering ui objects %s: \n%s" % (
+                    e, ui_object, traceback.format_exc()
+                ))
 
         return result