From: Zack Cerza Date: Thu, 19 Mar 2015 20:32:06 +0000 (-0600) Subject: Fix error formatting when 'action' is passed X-Git-Tag: 1.1.0~985^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0609fd0e3c2f346c55da4870c5bf76282748ee10;p=teuthology.git Fix error formatting when 'action' is passed Signed-off-by: Zack Cerza --- diff --git a/teuthology/contextutil.py b/teuthology/contextutil.py index 68670329aa..c3ae7fe1d8 100644 --- a/teuthology/contextutil.py +++ b/teuthology/contextutil.py @@ -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, diff --git a/teuthology/test/test_contextutil.py b/teuthology/test/test_contextutil.py index 2465459cd0..c82060427e 100644 --- a/teuthology/test/test_contextutil.py +++ b/teuthology/test/test_contextutil.py @@ -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: