# HG changeset patch # User Julien Cristau # Date 1426796392 -3600 # Node ID 518eb10adcd50a2893d519b6a8b9fb782059f4c2 # Parent ceb0e8e9129e929028cc50a70cc50688f653cb54 [web] cleanup xmlrss view Don't trigger exceptions unnecessarily, and add line breaks to the output. diff -r ceb0e8e9129e -r 518eb10adcd5 cubicweb/web/views/xmlrss.py --- a/cubicweb/web/views/xmlrss.py Wed Feb 17 14:01:35 2016 +0100 +++ b/cubicweb/web/views/xmlrss.py Thu Mar 19 21:19:52 2015 +0100 @@ -94,10 +94,8 @@ if value is None: self.w(u' <%s/>\n' % attr) else: - try: + if attrschema in SERIALIZERS: value = SERIALIZERS[attrschema](value) - except KeyError: - pass self.w(u' <%s>%s\n' % (attr, value, attr)) for relstr in self._cw.list_form_param('relation'): try: @@ -175,7 +173,7 @@ val = self._cw.view('final', rset, row=rowindex, col=colindex, format='text/plain') w(simple_sgml_tag(tag, val, **attrs)) - w(u' \n') + w(u'\n \n') w(u'\n' % self.xml_root)