Merge "Minor Python 3 fixes"

This commit is contained in:
Jenkins
2014-01-08 18:37:39 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -121,6 +121,7 @@ class SerializeRemoteExceptionTestCase(test_utils.BaseTestCase):
try:
raise self.cls(*self.args, **self.kwargs)
except Exception as ex:
cls_error = ex
if self.add_remote:
ex = add_remote_postfix(ex)
raise ex
@@ -139,7 +140,7 @@ class SerializeRemoteExceptionTestCase(test_utils.BaseTestCase):
self.assertEqual(failure['kwargs'], self.kwargs)
# Note: _Remote prefix not stripped from tracebacks
tb = ex.__class__.__name__ + ': ' + self.msg
tb = cls_error.__class__.__name__ + ': ' + self.msg
self.assertIn(tb, ''.join(failure['tb']))
if self.log_failure: