- Huge improvement in error output.
This commit is contained in:
parent
3178e8e90c
commit
7bae7875a0
@ -72,13 +72,16 @@ class Scyther(object):
|
|||||||
# from the error output (maybe this can also be done by flushing
|
# from the error output (maybe this can also be done by flushing
|
||||||
# the XML at certain points...)
|
# the XML at certain points...)
|
||||||
xmlinput = stdout.read()
|
xmlinput = stdout.read()
|
||||||
self.errors = stderr.readlines()
|
errlines = stderr.readlines()
|
||||||
|
|
||||||
# filter out any non-errors (say maybe only claim etc) and count
|
# filter out any non-errors (say maybe only claim etc) and count
|
||||||
# them.
|
# them.
|
||||||
# TODO for now this simply counts the lines
|
self.errors = []
|
||||||
|
for l in errlines:
|
||||||
|
if not l.startswith("claim\t"):
|
||||||
|
self.errors.append(l.strip())
|
||||||
|
|
||||||
self.errorcount = len(self.errors)
|
self.errorcount = len(self.errors)
|
||||||
print self.errorcount
|
|
||||||
|
|
||||||
# close
|
# close
|
||||||
stdout.close()
|
stdout.close()
|
||||||
|
@ -181,7 +181,7 @@ class ErrorWindow(wx.Dialog):
|
|||||||
line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
|
line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
|
||||||
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
|
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
|
||||||
|
|
||||||
label = wx.StaticText(self, -1, "".join(errors))
|
label = wx.StaticText(self, -1, "\n".join(errors))
|
||||||
sizer.Add(label, 0, wx.ALIGN_LEFT|wx.ALL, 5)
|
sizer.Add(label, 0, wx.ALIGN_LEFT|wx.ALL, 5)
|
||||||
|
|
||||||
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
|
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
""" Import externals """
|
""" Import externals """
|
||||||
import wx
|
import wx
|
||||||
|
import sys
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -63,7 +64,15 @@ class ScytherApp(wx.App):
|
|||||||
splash.Show()
|
splash.Show()
|
||||||
|
|
||||||
""" Build up """
|
""" Build up """
|
||||||
self.mainWindow = Mainwindow.MainWindow('scythergui-default.spdl')
|
infile = ''
|
||||||
|
args = sys.argv[1:]
|
||||||
|
if len(args) > 0:
|
||||||
|
if args[0] == 'test':
|
||||||
|
infile = 'scythergui-default.spdl'
|
||||||
|
else:
|
||||||
|
infile = args[0]
|
||||||
|
|
||||||
|
self.mainWindow = Mainwindow.MainWindow(infile)
|
||||||
self.SetTopWindow(self.mainWindow)
|
self.SetTopWindow(self.mainWindow)
|
||||||
self.mainWindow.Show()
|
self.mainWindow.Show()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user