[Lldb-commits] [PATCH] D88840: [dotest] Simplify logic to find the Python path

Jordan Rupprecht via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 5 16:30:05 PDT 2020


rupprecht accepted this revision.
rupprecht added inline comments.
This revision is now accepted and ready to land.


================
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:
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88840/new/

https://reviews.llvm.org/D88840



More information about the lldb-commits mailing list