]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix error formatting when 'action' is passed
authorZack Cerza <zack@redhat.com>
Thu, 19 Mar 2015 20:32:06 +0000 (14:32 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 19 Mar 2015 20:32:06 +0000 (14:32 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/contextutil.py
teuthology/test/test_contextutil.py

index 68670329aaa58264aaf5ebf52b92919e15a2dc90..c3ae7fe1d875565e61bb87c076f962238e721c97 100644 (file)
@@ -115,7 +115,7 @@ class safe_while(object):
         msg = 'reached maximum tries ({tries})' + \
             ' after waiting for {total} seconds'
         if self.action:
-            msg = "'{action}'" + msg
+            msg = "'{action}' " + msg
 
         msg = msg.format(
             action=self.action,
index 2465459cd0fcbe6dca2a725c66695f5bc9447bc3..c82060427e697277d2f5ba4fcbfd7f48f62cf95b 100644 (file)
@@ -62,7 +62,7 @@ class TestSafeWhile(object):
                     pass
 
         msg = error.value[0]
-        assert "'doing the thing'" in msg
+        assert "'doing the thing' reached maximum tries" in msg
 
     def test_no_raise(self):
         with self.s_while(_raise=False, _sleeper=self.fake_sleep) as proceed: