[Lldb-commits] [lldb] r358717 - [crashlog] Strip trailing `\n` from check_output return.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 18 14:32:36 PDT 2019
Author: davide
Date: Thu Apr 18 14:32:36 2019
New Revision: 358717
URL: http://llvm.org/viewvc/llvm-project?rev=358717&view=rev
Log:
[crashlog] Strip trailing `\n` from check_output return.
Generally having spurious `\n` doesn't matter, but here the
returning string is a command which is executed, so we want
to strip it. Pointed out by Jason.
Modified:
lldb/trunk/examples/python/crashlog.py
Modified: lldb/trunk/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/crashlog.py?rev=358717&r1=358716&r2=358717&view=diff
==============================================================================
--- lldb/trunk/examples/python/crashlog.py (original)
+++ lldb/trunk/examples/python/crashlog.py Thu Apr 18 14:32:36 2019
@@ -225,7 +225,7 @@ class CrashLog(symbolication.Symbolicato
if not os.path.exists(dsymForUUIDBinary):
try:
dsymForUUIDBinary = subprocess.check_output('which dsymForUUID',
- shell=True)
+ shell=True).rstrip('\n')
except:
dsymForUUIDBinary = ""
More information about the lldb-commits
mailing list