1
This commit is contained in:
parent
10de601297
commit
76da7be959
@ -18,6 +18,18 @@ def _bt_cmd(browser, tab, scriptmgr, params):
|
||||
def _p_cmd(browser, tab, scriptmgr, params):
|
||||
pass
|
||||
|
||||
def _debugon_cmd(browser, tab, scriptmgr, params):
|
||||
tab.debug = True
|
||||
print('debug on')
|
||||
|
||||
def _debugoff_cmd(browser, tab, scriptmgr, params):
|
||||
tab.debug = False
|
||||
print('debug off')
|
||||
|
||||
def _exit_cmd(browser, tab, scriptmgr, params):
|
||||
print('quit')
|
||||
exit(0)
|
||||
|
||||
def _processCdbCmd(cmd_str, browser, tab, scriptmgr):
|
||||
cmdlist = cmd_str.split(' ')
|
||||
if len(cmdlist) < 1:
|
||||
@ -25,9 +37,12 @@ def _processCdbCmd(cmd_str, browser, tab, scriptmgr):
|
||||
cmd_hash = {
|
||||
'b': _b_cmd,
|
||||
'bt': _bt_cmd,
|
||||
'p': None,
|
||||
'p': _p_cmd,
|
||||
'debugon': _debugon_cmd,
|
||||
'debugoff': _debugoff_cmd,
|
||||
'exit': _exit_cmd,
|
||||
'q': _exit_cmd,
|
||||
}
|
||||
print(cmdlist)
|
||||
if cmdlist[0] in cmd_hash:
|
||||
cmd_hash[cmdlist[0]](browser, tab, scriptmgr, cmdlist[1:])
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user