mirror of
https://github.com/django/django.git
synced 2025-09-22 10:12:43 +00:00
Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bef891399e
commit
5ceed0a053
46 changed files with 120 additions and 124 deletions
|
@ -186,7 +186,7 @@ def javascript_quote(s, quote_double_quotes=False):
|
|||
if type(s) == str:
|
||||
s = s.decode('utf-8')
|
||||
elif type(s) != unicode:
|
||||
raise TypeError, s
|
||||
raise TypeError(s)
|
||||
s = s.replace('\\', '\\\\')
|
||||
s = s.replace('\r', '\\r')
|
||||
s = s.replace('\n', '\\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue