提交 4523bc15 编写于 作者: L Lukáš Doktor

examples: Minor fixes in sleeptenmin test

The sleeptenmin example test contains `self.report_state` which should
not be called directly and it defines variable which is not used.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 13039b6f
......@@ -25,13 +25,12 @@ class SleepTenMin(Test):
length = int(self.params.get('sleep_length', default=600))
method = self.params.get('sleep_method', default='builtin')
for cycle in xrange(0, cycles):
for _ in xrange(0, cycles):
self.log.debug("Sleeping for %.2f seconds", length)
if method == 'builtin':
time.sleep(length)
elif method == 'shell':
os.system("sleep %s" % length)
self.report_state()
if __name__ == "__main__":
main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册