Merge pull request #184 from davegermiquet/IFCONDITION

ADD IF CONDITION In case connection was lost, or something happens to…
This commit is contained in:
Michel Oosterhof 2016-06-06 19:54:53 +04:00
commit 3b185f59ff
1 changed files with 4 additions and 1 deletions

View File

@ -484,7 +484,10 @@ class StdOutStdErrEmulationProtocol(object):
"""
self.data = self.data + data
if not self.next_protocol:
self.protocol.terminal.write(data)
if not self.protocol is None and not self.protocol.terminal is None:
self.protocol.terminal.write(data)
else:
log.msg("Connection was probably lost. Could not write to terminal")
def errReceived(self, data):