From fe5c9420a6778d5e1d069ab12db4de3a96ab010d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 14 Sep 2010 11:20:50 +0200 Subject: [PATCH] print error status and output on errors --- sface/sfiprocess.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index d2e806d..655fcb6 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -34,6 +34,22 @@ class SfiProcess(QObject): self.processFinished) def processFinished(self): + if self.process.exitStatus() == QProcess.CrashExit: + print self.readOutput() + print "Process exited with errors:", + err = self.process.error() + if err == QProcess.FailedToStart: + print "FailedToStart" + elif err == QProcess.Crashed: + print "Crashed" + elif err == QProcess.Timedout: + print "Timedout" + elif err == QProcess.WriteError: + print "WriteError" + elif err == QProcess.ReadError: + print "ReadError" + elif err == QProcess.UnknownError: + print "UnknownError" self.trace_end() self.emit(SIGNAL("finished()")) -- 2.43.0