From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/tools/
Date: Wed, 14 Aug 2013 14:56:24 +0000 (UTC) [thread overview]
Message-ID: <1376491217.ee04947562f151429497305a3fce9c3bbb88b125.dywi@gentoo> (raw)
commit: ee04947562f151429497305a3fce9c3bbb88b125
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Aug 14 14:40:17 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Aug 14 14:40:17 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ee049475
roverlay/tools/runcmd: get binary stdout
---
roverlay/tools/runcmd.py | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/roverlay/tools/runcmd.py b/roverlay/tools/runcmd.py
index ea76d57..5f3a672 100644
--- a/roverlay/tools/runcmd.py
+++ b/roverlay/tools/runcmd.py
@@ -13,7 +13,8 @@ import roverlay.strutil
DEBUG_TO_CONSOLE = False
def run_command_get_output (
- cmdv, env, debug_to_console=False, use_filter=True, filter_func=None
+ cmdv, env, debug_to_console=False, use_filter=True, filter_func=None,
+ binary_stdout=False,
):
# note that debug_to_console breaks calls that want to parse stdout
@@ -24,14 +25,23 @@ def run_command_get_output (
)
raw_output = cmd_call.communicate()
- output = [
- (
+ if binary_stdout:
+ assert len ( raw_output ) == 2
+ output = [
+ raw_output[0],
list ( roverlay.strutil.pipe_lines (
- stream, use_filter=True, filter_func=None
+ raw_output[1], use_filter=use_filter, filter_func=filter_func
) )
- if stream is not None else None
- ) for stream in raw_output
- ]
+ ]
+ else:
+ output = [
+ (
+ list ( roverlay.strutil.pipe_lines (
+ stream, use_filter=use_filter, filter_func=filter_func
+ ) )
+ if stream is not None else None
+ ) for stream in raw_output
+ ]
return ( cmd_call, output )
# --- end of run_command_get_output (...) ---
next reply other threads:[~2013-08-14 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 14:56 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-02-18 2:19 [gentoo-commits] proj/R_overlay:master commit in: roverlay/tools/ André Erdmann
2015-01-26 17:41 André Erdmann
2015-01-26 17:41 André Erdmann
2015-01-26 17:41 André Erdmann
2014-01-18 14:59 André Erdmann
2013-11-14 18:24 André Erdmann
2013-09-04 10:16 André Erdmann
2013-08-21 13:51 André Erdmann
2013-08-13 8:56 André Erdmann
2013-08-13 8:56 André Erdmann
2013-08-05 11:44 André Erdmann
2013-08-02 10:34 André Erdmann
2013-07-29 14:56 André Erdmann
2013-07-11 16:44 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-11 16:29 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-10 15:10 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-22 15:24 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=1376491217.ee04947562f151429497305a3fce9c3bbb88b125.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