From: W. Trevor King Date: Mon, 12 Nov 2012 17:18:50 +0000 (-0500) Subject: storage:base: convert to Python 3.3 compatibility X-Git-Tag: 1.1.0~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2a79c77e0f4150d9a49c584f9ce6c03a6822803f;p=be.git storage:base: convert to Python 3.3 compatibility --- diff --git a/libbe/storage/base.py b/libbe/storage/base.py index 8722590..977179d 100644 --- a/libbe/storage/base.py +++ b/libbe/storage/base.py @@ -563,18 +563,20 @@ if TESTING == True: def fail(self, msg=None): """Fail immediately, with the given message.""" - raise self.failureException, \ - '(%s) %s' % (self._classname(), msg) + raise self.failureException( + '({0}) {1}'.format(self._classname(), msg)) def failIf(self, expr, msg=None): "Fail the test if the expression is true." - if expr: raise self.failureException, \ - '(%s) %s' % (self._classname(), msg) + if expr: + raise self.failureException( + '({0}) {1}'.format(self._classname(), msg)) def failUnless(self, expr, msg=None): """Fail the test unless the expression is true.""" - if not expr: raise self.failureException, \ - '(%s) %s' % (self._classname(), msg) + if not expr: + raise self.failureException( + '({0}) {1}'.format(self._classname(), msg)) def setUp(self): """Set up test fixtures for Storage test case."""