update function was not working due to name clash for self.update
This commit is contained in:
parent
ee322be870
commit
0b4e75c201
|
@ -22,7 +22,7 @@ class Test():
|
|||
defaults = {'description': '',
|
||||
'keep': False,
|
||||
'accept': False,
|
||||
'update': False,
|
||||
'updateRequest': False,
|
||||
}
|
||||
for arg in defaults.keys():
|
||||
setattr(self,arg,kwargs.get(arg) if kwargs.get(arg) else defaults[arg])
|
||||
|
@ -61,7 +61,7 @@ class Test():
|
|||
|
||||
self.parser.set_defaults(keep = self.keep,
|
||||
accept = self.accept,
|
||||
update = self.update,
|
||||
update = self.updateRequest,
|
||||
)
|
||||
|
||||
|
||||
|
@ -80,8 +80,8 @@ class Test():
|
|||
|
||||
self.postprocess(variant)
|
||||
|
||||
if self.options.update and not self.update(variant):
|
||||
logging.critical('update for "{}" failed.'.format(name))
|
||||
if self.options.update:
|
||||
if self.update(variant) != 0: logging.critical('update for "{}" failed.'.format(name))
|
||||
elif not (self.options.accept or self.compare(variant)): # no update, do comparison
|
||||
return variant+1 # return culprit
|
||||
|
||||
|
@ -135,7 +135,7 @@ class Test():
|
|||
def update(self,variant):
|
||||
"""Update reference with current results."""
|
||||
logging.critical('update not supported.')
|
||||
return False
|
||||
return 1
|
||||
|
||||
|
||||
def dirReference(self):
|
||||
|
|
Loading…
Reference in New Issue