2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 11:57:37 +00:00

Fix web shell if user hits enter too fast

This commit is contained in:
Jarrod Johnson 2018-07-24 17:20:22 -04:00
parent 1bf4c0ac0a
commit d3afeb3414

View File

@ -129,7 +129,7 @@ class SshShell(conapi.Console):
data = data[:delidx - 1] + data[delidx + 1:]
self.username += data
if '\r' in self.username:
self.username, self.password = self.username.split('\r')
self.username, self.password = self.username.split('\r')[:2]
lastdata = data.split('\r')[0]
if lastdata != '':
self.datacallback(lastdata)