update function was not working due to name clash for self.update

This commit is contained in:
Martin Diehl 2016-09-10 20:44:46 +02:00
parent ee322be870
commit 0b4e75c201
1 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@ class Test():
defaults = {'description': '', defaults = {'description': '',
'keep': False, 'keep': False,
'accept': False, 'accept': False,
'update': False, 'updateRequest': False,
} }
for arg in defaults.keys(): for arg in defaults.keys():
setattr(self,arg,kwargs.get(arg) if kwargs.get(arg) else defaults[arg]) 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, self.parser.set_defaults(keep = self.keep,
accept = self.accept, accept = self.accept,
update = self.update, update = self.updateRequest,
) )
@ -80,8 +80,8 @@ class Test():
self.postprocess(variant) self.postprocess(variant)
if self.options.update and not self.update(variant): if self.options.update:
logging.critical('update for "{}" failed.'.format(name)) 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 elif not (self.options.accept or self.compare(variant)): # no update, do comparison
return variant+1 # return culprit return variant+1 # return culprit
@ -135,7 +135,7 @@ class Test():
def update(self,variant): def update(self,variant):
"""Update reference with current results.""" """Update reference with current results."""
logging.critical('update not supported.') logging.critical('update not supported.')
return False return 1
def dirReference(self): def dirReference(self):