Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #15635 -- Converted two legacy old-style raise statements. Than…

…ks, DaNmarner

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3e18969bcbc7af31eb0fc663b9754ce55bc57dfa 1 parent 8121aa6
Adrian Holovaty authored March 26, 2011
4  django/middleware/common.py
@@ -68,13 +68,13 @@ def process_request(self, request):
68 68
                     _is_valid_path("%s/" % request.path_info, urlconf)):
69 69
                 new_url[1] = new_url[1] + '/'
70 70
                 if settings.DEBUG and request.method == 'POST':
71  
-                    raise RuntimeError, (""
  71
+                    raise RuntimeError((""
72 72
                     "You called this URL via POST, but the URL doesn't end "
73 73
                     "in a slash and you have APPEND_SLASH set. Django can't "
74 74
                     "redirect to the slash URL while maintaining POST data. "
75 75
                     "Change your form to point to %s%s (note the trailing "
76 76
                     "slash), or set APPEND_SLASH=False in your Django "
77  
-                    "settings.") % (new_url[0], new_url[1])
  77
+                    "settings.") % (new_url[0], new_url[1]))
78 78
 
79 79
         if new_url == old_url:
80 80
             # No redirects required.
3  django/utils/unittest/case.py
@@ -997,8 +997,7 @@ def assertRaisesRegexp(self, expected_exception, expected_regexp,
997 997
                 excName = expected_exception.__name__
998 998
             else:
999 999
                 excName = str(expected_exception)
1000  
-            raise self.failureException, "%s not raised" % excName
1001  
-
  1000
+            raise self.failureException("%s not raised" % excName)
1002 1001
 
1003 1002
     def assertRegexpMatches(self, text, expected_regexp, msg=None):
1004 1003
         """Fail the test unless the text matches the regular expression."""

0 notes on commit 3e18969

Please sign in to comment.
Something went wrong with that request. Please try again.