- 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()
print self.errors # Report any errors (if there are some)
if len(self.errors) > 0:
print self.errors
xmlfile = StringIO.StringIO(xmlinput) if len(xmlinput) > 0:
reader = XMLReader.XMLReader() xmlfile = StringIO.StringIO(xmlinput)
self.claims = reader.readXML(xmlfile) reader = XMLReader.XMLReader()
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