diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2011-03-14 23:00:03 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2011-03-14 23:00:03 +0000 |
| commit | 4e25bc71b18e609768c4cf99854f350a5bc8e44d (patch) | |
| tree | be95ebd9050f21d8fe29f6bec9edd06fa6f1cfad /django | |
| parent | f43b3f58fb60a281c9db34c95f4a2a6384f40693 (diff) | |
Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/gdal/error.py | 2 | ||||
| -rw-r--r-- | django/test/_doctest.py | 4 | ||||
| -rw-r--r-- | django/utils/unittest/case.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/gdal/error.py b/django/contrib/gis/gdal/error.py index 58ca891672..1d89ad1a42 100644 --- a/django/contrib/gis/gdal/error.py +++ b/django/contrib/gis/gdal/error.py @@ -37,6 +37,6 @@ def check_err(code): return elif code in OGRERR_DICT: e, msg = OGRERR_DICT[code] - raise e, msg + raise e(msg) else: raise OGRException('Unknown error code: "%s"' % code) diff --git a/django/test/_doctest.py b/django/test/_doctest.py index 17fc88a1bc..485e33c0ab 100644 --- a/django/test/_doctest.py +++ b/django/test/_doctest.py @@ -380,9 +380,9 @@ class _OutputRedirectingPdb(pdb.Pdb): # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): if not inspect.ismodule(module): - raise TypeError, 'Expected a module: %r' % module + raise TypeError('Expected a module: %r' % module) if path.startswith('/'): - raise ValueError, 'Module-relative files may not have absolute paths' + raise ValueError('Module-relative files may not have absolute paths') # Find the base directory for the path. if hasattr(module, '__file__'): diff --git a/django/utils/unittest/case.py b/django/utils/unittest/case.py index 5ae602957b..8d943e2ce0 100644 --- a/django/utils/unittest/case.py +++ b/django/utils/unittest/case.py @@ -479,7 +479,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. |
