Fix odd QuteProc crash.
This commit is contained in:
parent
5ed419c7f5
commit
18ead66f04
@ -95,6 +95,9 @@ class Process(QObject):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def read_log(self):
|
def read_log(self):
|
||||||
"""Read the log from the process' stdout."""
|
"""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():
|
while self.proc.canReadLine():
|
||||||
line = self.proc.readLine()
|
line = self.proc.readLine()
|
||||||
line = bytes(line).decode('utf-8', errors='ignore').rstrip('\r\n')
|
line = bytes(line).decode('utf-8', errors='ignore').rstrip('\r\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user