[Python-modules-commits] r5986 - in packages/feedparser/trunk/debian/patches (2 files)

cgalisteo-guest at users.alioth.debian.org cgalisteo-guest at users.alioth.debian.org
Thu Jul 17 15:55:44 UTC 2008


    Date: Thursday, July 17, 2008 @ 15:55:43
  Author: cgalisteo-guest
Revision: 5986

Added title_override.patch which fixes #490613

Added:
  packages/feedparser/trunk/debian/patches/title_override.patch
Modified:
  packages/feedparser/trunk/debian/patches/series

Modified: packages/feedparser/trunk/debian/patches/series
===================================================================
--- packages/feedparser/trunk/debian/patches/series	2008-07-17 00:42:44 UTC (rev 5985)
+++ packages/feedparser/trunk/debian/patches/series	2008-07-17 15:55:43 UTC (rev 5986)
@@ -1,3 +1,4 @@
+title_override.patch
 democracynow_feedparser_fix.patch
 auth_handlers_not_working.patch
 doc_css_path.diff

Added: packages/feedparser/trunk/debian/patches/title_override.patch
===================================================================
--- packages/feedparser/trunk/debian/patches/title_override.patch	                        (rev 0)
+++ packages/feedparser/trunk/debian/patches/title_override.patch	2008-07-17 15:55:43 UTC (rev 5986)
@@ -0,0 +1,33 @@
+--- trunk.orig/feedparser.py
++++ trunk/feedparser.py
+@@ -1186,8 +1186,13 @@
+ 
+     def _start_title(self, attrsD):
+         self.pushContent('title', attrsD, 'text/plain', self.infeed or self.inentry or self.insource)
+-    _start_dc_title = _start_title
+-    _start_media_title = _start_title
++
++    def _start_title_low_pri(self, attrsD):
++        if not self._getContext().has_key('title'):
++            self._start_title(attrsD)
++
++    _start_dc_title = _start_title_low_pri
++    _start_media_title = _start_title_low_pri
+ 
+     def _end_title(self):
+         value = self.popContent('title')
+@@ -1196,8 +1201,12 @@
+             context['textinput']['title'] = value
+         elif self.inimage:
+             context['image']['title'] = value
+-    _end_dc_title = _end_title
+-    _end_media_title = _end_title
++
++    def _end_title_low_pri(self):
++        if not self._getContext().has_key('title'):
++            self._end_title()
++    _end_dc_title = _end_title_low_pri
++    _end_media_title = _end_title_low_pri
+ 
+     def _start_description(self, attrsD):
+         context = self._getContext()




More information about the Python-modules-commits mailing list