From: Eduardo Habkost <ehabkost@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] perf: Make clang_has_option() work on Python 3
Date: Fri, 5 Oct 2018 17:40:57 -0300 [thread overview]
Message-ID: <20181005204058.7966-2-ehabkost@redhat.com> (raw)
In-Reply-To: <20181005204058.7966-1-ehabkost@redhat.com>
Use a bytes literal so it works with Python 3's version of
Popen(). Note that the b"..." syntax requires Python 2.6+.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
tools/perf/util/setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index 1942f6dd24f6..261a55e7e1b2 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -5,7 +5,7 @@ from subprocess import Popen, PIPE
from re import sub
def clang_has_option(option):
- return [o for o in Popen(['clang', option], stderr=PIPE).stderr.readlines() if "unknown argument" in o] == [ ]
+ return [o for o in Popen(['clang', option], stderr=PIPE).stderr.readlines() if b"unknown argument" in o] == [ ]
cc = getenv("CC")
if cc == "clang":
--
2.18.0.rc1.1.g3f1ff2140
next prev parent reply other threads:[~2018-10-05 20:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 20:40 [PATCH 0/2] tools/perf: Python 3 + clang build fixes Eduardo Habkost
2018-10-05 20:40 ` Eduardo Habkost [this message]
2018-10-09 5:32 ` [tip:perf/core] perf python: Make clang_has_option() work on Python 3 tip-bot for Eduardo Habkost
2018-10-05 20:40 ` [PATCH 2/2] perf: More portable way to make CFLAGS work with clang Eduardo Habkost
2018-10-09 5:32 ` [tip:perf/core] perf python: " tip-bot for Eduardo Habkost
2018-10-05 21:23 ` [PATCH 0/2] tools/perf: Python 3 + clang build fixes Arnaldo Carvalho de Melo
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=20181005204058.7966-2-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.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