From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/elog/
Date: Tue, 11 Oct 2011 16:56:55 +0000 (UTC) [thread overview]
Message-ID: <12cb62465b130c21080281d78f7bfac077c17dfb.zmedico@gentoo> (raw)
commit: 12cb62465b130c21080281d78f7bfac077c17dfb
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 16:56:43 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 16:56:43 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=12cb6246
elog_process: fix ridicoulus newlines bug #386771
This fixes a regression since commit 8a119ea94ecc6668797e3a1358465ef3733f3a3e
which added a newline after each character. This boosts efficiency since we no
longer convert a strings to lists of characters.
---
pym/portage/elog/__init__.py | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py
index eeb6e71..33dac17 100644
--- a/pym/portage/elog/__init__.py
+++ b/pym/portage/elog/__init__.py
@@ -1,7 +1,11 @@
# elog/__init__.py - elog core functions
-# Copyright 2006-2009 Gentoo Foundation
+# Copyright 2006-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+import sys
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
import portage
portage.proxy.lazyimport.lazyimport(globals(),
'portage.util:writemsg',
@@ -53,9 +57,13 @@ def _combine_logentries(logentries):
if previous_type != msgtype:
previous_type = msgtype
rValue.append("%s: %s" % (msgtype, phase))
- for line in msgcontent:
- rValue.append(line.rstrip("\n"))
- rValue.append("")
+ if isinstance(msgcontent, basestring):
+ rValue.append(msgcontent.rstrip("\n"))
+ else:
+ for line in msgcontent:
+ rValue.append(line.rstrip("\n"))
+ if rValue:
+ rValue.append("")
return "\n".join(rValue)
_elog_mod_imports = {}
next reply other threads:[~2011-10-11 16:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 16:56 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-09 19:08 [gentoo-commits] proj/portage:master commit in: pym/portage/elog/ Zac Medico
2017-08-17 7:30 Michał Górny
2015-12-28 0:54 Zac Medico
2012-11-13 17:57 Zac Medico
2012-11-13 17:49 Zac Medico
2011-11-25 19:35 Zac Medico
2011-11-18 18:20 Zac Medico
2011-11-18 5:33 Zac Medico
2011-11-18 2:55 Zac Medico
2011-10-10 14:37 Zac Medico
2011-10-10 14:22 Zac Medico
2011-10-06 1:22 Zac Medico
2011-09-03 23:17 Zac Medico
2011-09-03 23:11 Zac Medico
2011-09-03 23:00 Zac Medico
2011-07-11 18:00 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12cb62465b130c21080281d78f7bfac077c17dfb.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox