[Python] 纯文本查看 复制代码Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 111, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 482, in read_nonblocking
raise TIMEOUT('Timeout exceeded.')
pexpect.exceptions.TIMEOUT: Timeout exceeded.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hrj/PycharmProjects/untitled/test.py", line 40, in
main()
File "/home/hrj/PycharmProjects/untitled/test.py", line 36, in main
child.expect('>')
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 340, in expect
return self.expect_list(compiled_pattern_list,
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 119, in expect_loop
return self.timeout(e)
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 82, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: Timeout exceeded.
command: /usr/bin/ssh
args: ['/usr/bin/ssh', 'admin@172.18.103.10']
buffer (last 100 chars): b'#\r\r\nvlan 101\r\r\n description ILO\r\r\n#\r\r\nvlan 102\r\r\n description CVK_GL\r\r\n#\r\r\nvlan 103\r\r\n---- More ----'
before (last 100 chars): b'#\r\r\nvlan 101\r\r\n description ILO\r\r\n#\r\r\nvlan 102\r\r\n description CVK_GL\r\r\n#\r\r\nvlan 103\r\r\n---- More ----'
after:
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 2864
child_fd: 5
closed: False
timeout: 30
delimiter:
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'>')