storage:base: convert to Python 3.3 compatibility
authorW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 17:18:50 +0000 (12:18 -0500)
committerW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 17:18:55 +0000 (12:18 -0500)
libbe/storage/base.py

index 872259070b38f14dafcf4cec81070513834ffe04..977179d97c32d1e6d16f62daad5eac48ef3bbee3 100644 (file)
@@ -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."""