From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/ebuild/
Date: Mon, 8 Jul 2013 22:47:59 +0000 (UTC) [thread overview]
Message-ID: <1373323122.67400590e39f148355b08b20efa67278dc28de6d.dywi@gentoo> (raw)
commit: 67400590e39f148355b08b20efa67278dc28de6d
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Jul 8 22:38:42 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Jul 8 22:38:42 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=67400590
roverlay/ebuild/ebuilder: remove newline at EOF
Using want_newline=<True|False> instead of inserting a newline directly fixes
a (minor) syntax issue.
---
roverlay/ebuild/ebuilder.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/roverlay/ebuild/ebuilder.py b/roverlay/ebuild/ebuilder.py
index 6806478..047a678 100644
--- a/roverlay/ebuild/ebuilder.py
+++ b/roverlay/ebuild/ebuilder.py
@@ -25,20 +25,26 @@ class Ebuilder ( object ):
def get_lines ( self ):
"""Creates and returns (ordered) text lines."""
+ EMPTY_STR = ""
evar_list = sorted (
self._evars.values(), key=lambda e: ( e.priority, e.name )
)
- last = len ( evar_list ) - 1
+ last = len ( evar_list ) - 1
+ want_newline = False
for index, e in enumerate ( evar_list ):
if e.active():
varstr = str ( e )
if varstr:
+ if want_newline:
+ yield EMPTY_STR
+ want_newline = False
+
yield varstr
if index < last and self.min_newline_distance < abs (
evar_list [index + 1].priority - e.priority
):
- yield ''
+ want_newline = True
# -- end for;
# --- end of get_lines (...) ---
next reply other threads:[~2013-07-09 22:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 22:47 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-10 16:16 [gentoo-commits] proj/R_overlay:master commit in: roverlay/ebuild/ André Erdmann
2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 8:26 André Erdmann
2013-07-08 22:47 André Erdmann
2013-07-08 22:47 André Erdmann
2013-06-19 18:58 André Erdmann
2013-06-05 18:08 André Erdmann
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=1373323122.67400590e39f148355b08b20efa67278dc28de6d.dywi@gentoo \
--to=dywi@mailerd.de \
--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