summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2010-01-10 18:36:20 +0000
committerAdrian Holovaty <adrian@holovaty.com>2010-01-10 18:36:20 +0000
commit5ceed0a05388079118319940acdb2abe4ee01de6 (patch)
treec158b29638a509bef59fbbff164faf2749d35fe4 /django/utils/text.py
parentbef891399ec278390ee148b0bb87d4c4140fc4c6 (diff)
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
Diffstat (limited to 'django/utils/text.py')
-rw-r--r--django/utils/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/text.py b/django/utils/text.py
index fe46e26b52..c45e42ddda 100644
--- a/django/utils/text.py
+++ b/django/utils/text.py
@@ -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')