Fix odd QuteProc crash.

This commit is contained in:
Florian Bruhin 2015-10-27 07:08:17 +01:00
parent 5ed419c7f5
commit 18ead66f04

View File

@ -95,6 +95,9 @@ class Process(QObject):
@pyqtSlot()
def read_log(self):
"""Read the log from the process' stdout."""
if not hasattr(self, 'proc'):
# I have no idea how this happens, but it does...
return
while self.proc.canReadLine():
line = self.proc.readLine()
line = bytes(line).decode('utf-8', errors='ignore').rstrip('\r\n')