Update run_server.py

pull/155/head
kelianchun 2016-03-23 15:47:08 +08:00
parent 73382cbcfb
commit db72048c31
1 changed files with 6 additions and 6 deletions

View File

@ -367,13 +367,13 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
match = self.term.ps1_pattern.search(self.term.vim_data)
if match:
self.term.vim_flag = False
data = self.term.deal_command(self.term.data)[0:200]
if len(data) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), cmd=data).save()
result = self.term.deal_command(self.term.data)[0:200]
if len(result) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), cmd=result).save()
else:
data = self.term.deal_command(self.term.data)[0:200]
if len(data) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), cmd=data).save()
result = self.term.deal_command(self.term.data)[0:200]
if len(result) > 0:
TtyLog(log=self.log, datetime=datetime.datetime.now(), cmd=result).save()
self.term.vim_data = ''
self.term.data = ''
self.term.input_mode = False