From f8a0d31d71bf722741a472c27ae0a10ecbcbcec3 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 5 Jun 2013 13:45:28 +0100 Subject: Remove ConfigurationError in favor of Django's ImproperlyConfigured --- rest_framework/throttling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rest_framework/throttling.py') diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index 93ea9816..9d89d1cb 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -3,7 +3,7 @@ Provides various throttling policies. """ from __future__ import unicode_literals from django.core.cache import cache -from rest_framework import exceptions +from django.core.exceptions import ImproperlyConfigured from rest_framework.settings import api_settings import time @@ -65,13 +65,13 @@ class SimpleRateThrottle(BaseThrottle): if not getattr(self, 'scope', None): msg = ("You must set either `.scope` or `.rate` for '%s' throttle" % self.__class__.__name__) - raise exceptions.ConfigurationError(msg) + raise ImproperlyConfigured(msg) try: return self.settings.DEFAULT_THROTTLE_RATES[self.scope] except KeyError: msg = "No default throttle rate set for '%s' scope" % self.scope - raise exceptions.ConfigurationError(msg) + raise ImproperlyConfigured(msg) def parse_rate(self, rate): """ -- cgit v1.2.3