Bug#737398: PTS is confused by trailing commas in Uploaders
Package: qa.debian.org
Severity: minor
Tags: patch
Hi,
It seems that the PTS is confused by fields containing trailing
commas (as inserted by wrap-and-ort -t).
For example on the PTS entry of babelfish, it displays
"maint Debian Python Modules Team (a), Etienne Millon (u), Oxan van
Leeuwen (u), (u)"
http://packages.qa.debian.org/b/babelfish.html
The attached patch seems to fix the issue by filtering empty strings,
but I'm not too familiar with the PTS source code so testing is
advised.
Thanks!
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.12-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
Etienne Millon
Index: www/bin/sources_to_xml.py
===================================================================
--- www/bin/sources_to_xml.py (revision 3108)
+++ www/bin/sources_to_xml.py (working copy)
@@ -29,7 +29,8 @@
# Just as address_from_string, it tries to be forgiving about unquoted
# commas in addresses. [PvR]
def addresses_from_string(content):
- return map(address_from_string, re.split('(?<=>)\s*,\s*', content))
+ matches = re.split('(?<=>)\s*,\s*', content)
+ return [address_from_string(m) for m in matches if m]
def add_maintainer_info(child, name, mail, doc):
text = doc.createTextNode(unicode(name, 'UTF-8', 'replace')) # Take care of non-ascii
Reply to: