diff options
author | Joar Wandborg <git@wandborg.com> | 2011-11-30 21:21:39 +0100 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-12-31 10:32:52 -0600 |
commit | a246ccca69e863904718537f45a17d226b33a123 (patch) | |
tree | 599aad1e47d56bf064430f10cdb378c59e2437ce /mediagoblin/submit/views.py | |
parent | 992e4f80324e5e2d0079fd70cce9d4ad962f7047 (diff) | |
download | mediagoblin-a246ccca69e863904718537f45a17d226b33a123.tar.lz mediagoblin-a246ccca69e863904718537f45a17d226b33a123.tar.xz mediagoblin-a246ccca69e863904718537f45a17d226b33a123.zip |
ASCII media type support & fix a bug in file submission error handling
* Added ASCII media processing
* Added ASCII media display
* Added ASCII media type
Rebased from Joar Wandborg's ascii art branch (squashed to remove the
commits borrowing code of dubious license)
Fixed a bug in file submission error handling:
- Moved file-extension condition out of loop (what did it do there?)
- Updated file submission tests
- Changed error handling in file submission, should now report more
than absolutely necessary.
Diffstat (limited to 'mediagoblin/submit/views.py')
-rw-r--r-- | mediagoblin/submit/views.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index 4e4c7c43..443d0e52 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -128,9 +128,13 @@ def submit_start(request): return redirect(request, "mediagoblin.user_pages.user_home", user=request.user.username) - except InvalidFileType, exc: + except Exception as e: + ''' + This section is intended to catch exceptions raised in + mediagobling.media_types + ''' submit_form.file.errors.append( - _(u'Invalid file type.')) + e) return render_to_response( request, |