1 |
commit: 935694debc955a18a6a93af923f3f98caacf3f74 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 18 18:20:21 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 18 18:20:21 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=935694de |
7 |
|
8 |
collect_ebuild_messages: handle \r, bug #390833 |
9 |
|
10 |
--- |
11 |
pym/portage/elog/messages.py | 5 +++-- |
12 |
1 files changed, 3 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/elog/messages.py b/pym/portage/elog/messages.py |
15 |
index ba2ed46..a4897d8 100644 |
16 |
--- a/pym/portage/elog/messages.py |
17 |
+++ b/pym/portage/elog/messages.py |
18 |
@@ -54,8 +54,9 @@ def collect_ebuild_messages(path): |
19 |
f = io.open(_unicode_encode(filename, |
20 |
encoding=_encodings['fs'], errors='strict'), |
21 |
mode='r', encoding=_encodings['repo.content'], errors='replace') |
22 |
- for l in f: |
23 |
- l = l.rstrip('\n') |
24 |
+ # Use split('\n') since normal line iteration or readlines() will |
25 |
+ # split on \r characters as shown in bug #390833. |
26 |
+ for l in f.read().split('\n'): |
27 |
if not l: |
28 |
continue |
29 |
try: |