Commit 84118543 authored by Jonathan Michalon's avatar Jonathan Michalon

Merge branch 'simpler-count-op' of http://gitlab.netlib.re/b4n/picomon into...

Merge branch 'simpler-count-op' of http://gitlab.netlib.re/b4n/picomon into b4n/picomon-simpler-count-op
parents 4a267f1d 5b93ae49
......@@ -41,17 +41,15 @@ class Check(object):
pass
def run(self, immediate=False):
self.every_count += 1
if self.every_count == self.every or immediate:
self.every_count = (self.every_count + 1) % self.every
if self.every_count == 0 or immediate:
self.setup()
if not self.check():
self.retry_count += 1
if self.retry_count > self.retry or immediate:
self.retry_count = (self.retry_count + 1) % (self.retry + 1)
if self.retry_count == 0 or immediate:
self.ok = False
else:
self.ok = True
self.retry_count = 0
self.every_count = 0
self.teardown()
return self.ok
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment