]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/task/sleep: be explicit about seconds 1209/head
authorNathan Cutler <ncutler@suse.com>
Fri, 14 Sep 2018 10:42:41 +0000 (12:42 +0200)
committerNathan Cutler <ncutler@suse.com>
Sat, 15 Sep 2018 06:16:48 +0000 (08:16 +0200)
Add the word "seconds" at the end of the log message, since "time.sleep()"
takes a number which is always interpreted as the number of seconds to sleep
for.

Before this commit, the log said:

    INFO:teuthology.task.sleep:Sleeping for 10

After:

    INFO:teuthology.task.sleep:Sleeping for 10 seconds

Signed-off-by: Nathan Cutler <ncutler@suse.com>
teuthology/task/sleep.py

index 4e36d599b6df57f3c88ecdb44d07a675f6f2ada2..bd6d4454463c7af17f70683eb2750d6c1d53b7e6 100644 (file)
@@ -28,5 +28,5 @@ def task(ctx, config):
         config = {}
     assert isinstance(config, dict)
     duration = int(config.get('duration', 5))
-    log.info('Sleeping for %d', duration)
+    log.info('Sleeping for {} seconds'.format(duration))
     time.sleep(duration)