diff options
| author | Marc Tamlyn | 2013-02-06 13:05:17 +0000 |
|---|---|---|
| committer | Marc Tamlyn | 2013-02-06 13:05:17 +0000 |
| commit | bd7977eed79bd8fc4d9e73b6d848b0f0cd5a72ec (patch) | |
| tree | 4dc46974f2e1b6e957e611d820329d82efe2eae9 /rest_framework/compat.py | |
| parent | cc2ec2bbf0aee53d360a81cf338361feca1e8f80 (diff) | |
| download | django-rest-framework-bd7977eed79bd8fc4d9e73b6d848b0f0cd5a72ec.tar.bz2 | |
Purge naked excepts.
Most of these had obvious exceptions which would be thrown. Some I'm not
sure about but they should at least catch only Exception so as not to
ignore SystemExit and other inappropriate Error classes.
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 0d512342..9636b9c1 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -10,13 +10,13 @@ import django # Try to import six from Django, fallback to included `six`. try: from django.utils import six -except: +except ImportError: from rest_framework import six # location of patterns, url, include changes in 1.4 onwards try: from django.conf.urls import patterns, url, include -except: +except ImportError: from django.conf.urls.defaults import patterns, url, include # Handle django.utils.encoding rename: @@ -35,7 +35,7 @@ except ImportError: # django-filter is optional try: import django_filters -except: +except ImportError: django_filters = None |
