diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 18:36:20 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 18:36:20 +0000 |
| commit | 5ceed0a05388079118319940acdb2abe4ee01de6 (patch) | |
| tree | c158b29638a509bef59fbbff164faf2749d35fe4 /django/db/models/options.py | |
| parent | bef891399ec278390ee148b0bb87d4c4140fc4c6 (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/db/models/options.py')
| -rw-r--r-- | django/db/models/options.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py index 05ff54a333..01a13b4ac3 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -94,7 +94,7 @@ class Options(object): # Any leftover attributes must be invalid. if meta_attrs != {}: - raise TypeError, "'class Meta' got invalid attribute(s): %s" % ','.join(meta_attrs.keys()) + raise TypeError("'class Meta' got invalid attribute(s): %s" % ','.join(meta_attrs.keys())) else: self.verbose_name_plural = string_concat(self.verbose_name, 's') del self.meta @@ -274,7 +274,7 @@ class Options(object): for f in to_search: if f.name == name: return f - raise FieldDoesNotExist, '%s has no field named %r' % (self.object_name, name) + raise FieldDoesNotExist('%s has no field named %r' % (self.object_name, name)) def get_field_by_name(self, name): """ |
