- Added errorcount to Scyther object.
This commit is contained in:
parent
756e69bd4f
commit
5d02e446c9
@ -38,6 +38,7 @@ class Scyther(object):
|
||||
self.inputfile = None
|
||||
self.claims = None
|
||||
self.errors = None
|
||||
self.errorcount = 0
|
||||
|
||||
def setInput(self,spdl):
|
||||
self.spdl = spdl
|
||||
@ -70,12 +71,17 @@ class Scyther(object):
|
||||
xmlinput = stdout.read()
|
||||
self.errors = stderr.readlines()
|
||||
|
||||
# filter out any non-errors (say maybe only claim etc) and count
|
||||
# them.
|
||||
# TODO for now this simply counts the lines
|
||||
self.errorcount = len(self.errors)
|
||||
|
||||
# close
|
||||
stdout.close()
|
||||
stderr.close()
|
||||
|
||||
# Report any errors (if there are some)
|
||||
if len(self.errors) > 0:
|
||||
if self.errorcount > 0:
|
||||
print self.errors
|
||||
|
||||
if len(xmlinput) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user