lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Oct 2018 22:32:05 -0700
From:   tip-bot for Eduardo Habkost <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     ehabkost@...hat.com, mingo@...nel.org,
        linux-kernel@...r.kernel.org, wangnan0@...wei.com,
        namhyung@...nel.org, hpa@...or.com, acme@...hat.com,
        jolsa@...nel.org, tglx@...utronix.de, dsahern@...il.com,
        adrian.hunter@...el.com
Subject: [tip:perf/core] perf python: Make clang_has_option() work on Python
 3

Commit-ID:  e13a5d69c31d35538e80176d54d95b6addf4dcbf
Gitweb:     https://git.kernel.org/tip/e13a5d69c31d35538e80176d54d95b6addf4dcbf
Author:     Eduardo Habkost <ehabkost@...hat.com>
AuthorDate: Fri, 5 Oct 2018 17:40:57 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 8 Oct 2018 14:30:44 -0300

perf python: Make clang_has_option() work on Python 3

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@...hat.com>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/20181005204058.7966-2-ehabkost@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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":

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ