From 24bf8958908e758b225195367143597fbca3729c Mon Sep 17 00:00:00 2001 From: ccremers Date: Tue, 2 Jan 2007 15:34:58 +0000 Subject: [PATCH] - Added error report in case of no output at all. (Tailored for reported OS X problem.) --- gui/Scyther/Scyther.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/Scyther/Scyther.py b/gui/Scyther/Scyther.py index ca5b812..523ac72 100755 --- a/gui/Scyther/Scyther.py +++ b/gui/Scyther/Scyther.py @@ -176,7 +176,7 @@ class Scyther(object): # Scyther hickups on completely empty input spdl = None - # Generate temporary files for the output + # Generate temporary files for the output. # Requires Python 2.3 though. (fde,fne) = tempfile.mkstemp() # errors (fdo,fno) = tempfile.mkstemp() # output @@ -197,7 +197,8 @@ class Scyther(object): if spdl: self.cmd += " %s" % fni - print self.cmd + # Only for debugging, really + ##print self.cmd # Start the process os.system(self.cmd) @@ -216,6 +217,13 @@ class Scyther(object): if spdl: os.remove(fni) + # Now if there is no output and no errors, weird things might + # happen, and we report the command used. + if errors == "" and output == "": + errors = "Scyther backend did not yield any output, " + errors += "returning no errors and no output.\n" + errors += "Command: [%s]" % self.cmd + return (output,errors) def verify(self):