- Error is captured nicely and printed (for now). We need an error

window for that, instead of a results window.
This commit is contained in:
ccremers 2006-08-06 19:57:01 +00:00
parent ea9c4d5334
commit 756e69bd4f
2 changed files with 11 additions and 5 deletions

View File

@ -74,11 +74,17 @@ class Scyther(object):
stdout.close() stdout.close()
stderr.close() stderr.close()
# Report any errors (if there are some)
if len(self.errors) > 0:
print self.errors print self.errors
if len(xmlinput) > 0:
xmlfile = StringIO.StringIO(xmlinput) xmlfile = StringIO.StringIO(xmlinput)
reader = XMLReader.XMLReader() reader = XMLReader.XMLReader()
self.claims = reader.readXML(xmlfile) self.claims = reader.readXML(xmlfile)
else:
# no output...
self.claims = []
return self.claims return self.claims

View File

@ -226,7 +226,7 @@ class ResultWindow(wx.Frame):
sn = claims[0].stateName(2) sn = claims[0].stateName(2)
resulttxt = sn[0].upper() + sn[1:] resulttxt = sn[0].upper() + sn[1:]
else: else:
resultxt = "Results" resulttxt = "Results"
titlebar(5,resulttxt,2) titlebar(5,resulttxt,2)
self.lastprot = None self.lastprot = None