about summary refs log tree commit diff
path: root/src/etc/lldb_batchmode.py
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-10-08 01:39:27 +0800
committerkennytm <kennytm@gmail.com>2017-10-08 01:39:34 +0800
commit07b189977d88d1de595601e7137275e4f4ccd8a2 (patch)
treeafe097a0f255f7af50dc876a9b18b2c3f962677b /src/etc/lldb_batchmode.py
parentbb4d1491466d8239a7a5fd68bd605e3276e97afb (diff)
downloadrust-07b189977d88d1de595601e7137275e4f4ccd8a2.tar.gz
rust-07b189977d88d1de595601e7137275e4f4ccd8a2.zip
debuginfo-test: Fix #45086.
LLDB's output may be None instead of '', and that will cause type
mismatch when normalize_whitespace() expects a string instead of
None. This commit simply ensures we do pass '' even if the output
is None.
Diffstat (limited to 'src/etc/lldb_batchmode.py')
-rw-r--r--src/etc/lldb_batchmode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py
index 4952cf4f82c..24a0ce0ac36 100644
--- a/src/etc/lldb_batchmode.py
+++ b/src/etc/lldb_batchmode.py
@@ -81,7 +81,7 @@ def execute_command(command_interpreter, command):
 
     if res.Succeeded():
         if res.HasResult():
-            print(normalize_whitespace(res.GetOutput()), end='\n')
+            print(normalize_whitespace(res.GetOutput() or ''), end='\n')
 
         # If the command introduced any breakpoints, make sure to register
         # them with the breakpoint