diff options
| author | Gregor MacGregor <Timothy.J.Clifford@gmail.com> | 2013-09-06 13:24:52 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-10 11:09:59 -0400 |
| commit | b2b763448f726ee952743596e9a34fcb154bdb12 (patch) | |
| tree | 5da48d220f856a2c8e42a0e1a19e909b7401ac59 /django/utils | |
| parent | d59f1993f150f83524051d96b52df08da4dcf011 (diff) | |
Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/archive.py | 4 | ||||
| -rw-r--r-- | django/utils/dateformat.py | 2 | ||||
| -rw-r--r-- | django/utils/feedgenerator.py | 2 | ||||
| -rw-r--r-- | django/utils/functional.py | 2 | ||||
| -rw-r--r-- | django/utils/regex_helper.py | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/django/utils/archive.py b/django/utils/archive.py index 0faf1fa781..0a95fa84a6 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -126,10 +126,10 @@ class BaseArchive(object): return True def extract(self): - raise NotImplementedError + raise NotImplementedError('subclasses of BaseArchive must provide an extract() method') def list(self): - raise NotImplementedError + raise NotImplementedError('subclasses of BaseArchive must provide a list() method') class TarArchive(BaseArchive): diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py index 85eb975f84..3c235d9867 100644 --- a/django/utils/dateformat.py +++ b/django/utils/dateformat.py @@ -65,7 +65,7 @@ class TimeFormat(Formatter): def B(self): "Swatch Internet time" - raise NotImplementedError + raise NotImplementedError('may be implemented in a future release') def e(self): """ diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index e632845a84..f7fec5e7f9 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -177,7 +177,7 @@ class SyndicationFeed(object): Outputs the feed in the given encoding to outfile, which is a file-like object. Subclasses should override this. """ - raise NotImplementedError + raise NotImplementedError('subclasses of SyndicationFeed must provide a write() method') def writeString(self, encoding): """ diff --git a/django/utils/functional.py b/django/utils/functional.py index bfd59e5340..65ec4b53c4 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -257,7 +257,7 @@ class LazyObject(object): """ Must be implemented by subclasses to initialise the wrapped object. """ - raise NotImplementedError + raise NotImplementedError('subclasses of LazyObject must provide a _setup() method') # Introspection support __dir__ = new_method_proxy(dir) diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py index 7b40d141de..449bb8da42 100644 --- a/django/utils/regex_helper.py +++ b/django/utils/regex_helper.py @@ -92,7 +92,7 @@ def normalize(pattern): result.append(".") elif ch == '|': # FIXME: One day we'll should do this, but not in 1.0. - raise NotImplementedError + raise NotImplementedError('Awaiting Implementation') elif ch == "^": pass elif ch == '$': |
