[Lldb-commits] [PATCH] D88840: [dotest] Simplify logic to find the Python path
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 5 16:34:39 PDT 2020
JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.
================
Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:550-551
+ # If our lldb supports the -P option, use it to find the python path:
+ with open(os.devnull, 'w') as DEVNULL:
+ lldb_dash_p_result = subprocess.check_output([lldbtest_config.lldbExec, "-P"], stderr=DEVNULL, universal_newlines=True)
+ if lldb_dash_p_result:
----------------
rupprecht wrote:
> Is DEVNULL necessary? I think `stderr=None` might work just as well.
>
> FWIW, subprocess.DEVNULL exists as of python 3.3, but I guess we still have python2 users.
Neat, `None` is the default argument so I'll just omit it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88840/new/
https://reviews.llvm.org/D88840
More information about the lldb-commits
mailing list