[Reportbug-commits] [reportbug] 08/38: Add line endings when processing strings line by line

Sandro Tosi morph at moszumanska.debian.org
Fri Dec 29 04:33:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit f3d4bfaabe833f753cb9033fd5e507180a9f280c
Author: Nis Martensen <nis.martensen at web.de>
Date:   Fri Jun 30 23:19:32 2017 +0200

    Add line endings when processing strings line by line
    
    Bug introduced in d7e9eb8cc5d2efa4543bd35a806cbc36d7419e5e
---
 reportbug/debbugs.py | 4 ++--
 reportbug/utils.py   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/reportbug/debbugs.py b/reportbug/debbugs.py
index d941d74..8bb8d61 100644
--- a/reportbug/debbugs.py
+++ b/reportbug/debbugs.py
@@ -971,7 +971,7 @@ def parse_html_report(number, url, http_proxy, timeout, followups=False, cgi=Tru
 
     parser = BTSParser(cgi=cgi, followups=followups)
     for line in page.splitlines():
-        parser.feed(line)
+        parser.feed(line + '\n')
     parser.close()
 
     items = parser.preblock
@@ -1123,7 +1123,7 @@ def get_reports(package, timeout, system='debian', mirrors=None, version=None,
 
         parser = BTSParser()
         for line in page.splitlines():
-            parser.feed(line)
+            parser.feed(line + '\n')
         parser.close()
 
         return parser.bugcount, parser.title, parser.hierarchy
diff --git a/reportbug/utils.py b/reportbug/utils.py
index 3974018..5e5ec4b 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -1205,7 +1205,7 @@ def launch_mbox_reader(cmd, url, http_proxy, timeout):
     (fd, fname) = TempFile()
     try:
         for line in mbox.splitlines():
-            fd.write(line)
+            fd.write(line + '\n')
         fd.close()
         if cmd is not None:
             try:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list