diff options
Diffstat (limited to 'lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py')
-rw-r--r-- | lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py index e0c24055c83..14add9943dc 100644 --- a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py +++ b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py @@ -1,16 +1,19 @@ from __future__ import print_function import sys -import shlex +def split(command): + command = command.strip() + return command.rsplit(' ', 1) + def command_function(debugger, command, exe_ctx, result, internal_dict): result.SetImmediateOutputFile(sys.__stdout__) print('this is a test string, just a test string', file=result) def write_file(debugger, command, exe_ctx, result, internal_dict): - args = shlex.split(command) + args = split(command) path = args[0] mode = args[1] with open(path, mode) as f: |