Fixes #240 - IndexError: list index out of range
Thanks to https://github.com/gusc (Gusts Kaksis) for the patch.
diff --git a/src/scripts/lldb.py b/src/scripts/lldb.py
index 6189a3d..627173b 100644
--- a/src/scripts/lldb.py
+++ b/src/scripts/lldb.py
@@ -32,7 +32,10 @@
args = command.split('--',1)
error = lldb.SBError()
lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
- lldb.target.Launch(lldb.SBLaunchInfo(shlex.split(args[1] and args[1] or '{args}')), error)
+ args_arr = []
+ if len(args) > 1:
+ args_arr = shlex.split(args[1] and args[1] or '{args}')
+ lldb.target.Launch(lldb.SBLaunchInfo(args_arr), error)
lockedstr = ': Locked'
if lockedstr in str(error):
print('\\nDevice Locked\\n')