diff options
Diffstat (limited to 'django/core/files/uploadhandler.py')
| -rw-r--r-- | django/core/files/uploadhandler.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/django/core/files/uploadhandler.py b/django/core/files/uploadhandler.py index 2afb79e051..4316fddf43 100644 --- a/django/core/files/uploadhandler.py +++ b/django/core/files/uploadhandler.py @@ -204,10 +204,11 @@ def load_handler(path, *args, **kwargs): module, attr = path[:i], path[i+1:] try: mod = importlib.import_module(module) - except ImportError, e: + except ImportError as e: raise ImproperlyConfigured('Error importing upload handler module %s: "%s"' % (module, e)) - except ValueError, e: - raise ImproperlyConfigured('Error importing upload handler module. Is FILE_UPLOAD_HANDLERS a correctly defined list or tuple?') + except ValueError: + raise ImproperlyConfigured('Error importing upload handler module.' + 'Is FILE_UPLOAD_HANDLERS a correctly defined list or tuple?') try: cls = getattr(mod, attr) except AttributeError: |
