diff --git a/third_party/Python/module/unittest2/unittest2/case.py b/third_party/Python/module/unittest2/unittest2/case.py index 29103c8b7..485cef09c 100644 --- a/third_party/Python/module/unittest2/unittest2/case.py +++ b/third_party/Python/module/unittest2/unittest2/case.py @@ -510,7 +510,7 @@ class TestCase(unittest.TestCase): excName = excClass.__name__ else: excName = str(excClass) - raise self.failureException, "%s not raised" % excName + raise self.failureException("%s not raised" % excName) def _getAssertEqualityFunc(self, first, second): """Get a detailed comparison function for the types of the two args. @@ -1028,7 +1028,7 @@ class TestCase(unittest.TestCase): excName = expected_exception.__name__ else: excName = str(expected_exception) - raise self.failureException, "%s not raised" % excName + raise self.failureException("%s not raised" % excName) def assertRegexpMatches(self, text, expected_regexp, msg=None): diff --git a/utils/sync-source/syncsource.py b/utils/sync-source/syncsource.py index 409d72c30..736aefd9a 100644 --- a/utils/sync-source/syncsource.py +++ b/utils/sync-source/syncsource.py @@ -234,7 +234,7 @@ def sync_configured_sources(options, configuration, default_excludes): if len(transfer_specs) > 0: transfer_agent.transfer(transfer_specs, options.dry_run) else: - raise "nothing to transfer, bad configuration?" + raise Exception("nothing to transfer, bad configuration?") def main():