diff options
Diffstat (limited to 'matweb/frontend.py')
| -rw-r--r-- | matweb/frontend.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/matweb/frontend.py b/matweb/frontend.py index d29a2fb..395606f 100644 --- a/matweb/frontend.py +++ b/matweb/frontend.py | |||
| @@ -64,11 +64,11 @@ def upload_file(): | |||
| 64 | current_app.logger.error('Invalid Filename in upload') | 64 | current_app.logger.error('Invalid Filename in upload') |
| 65 | return redirect(request.url) | 65 | return redirect(request.url) |
| 66 | 66 | ||
| 67 | parser, mime = utils.get_file_parser(filepath) | 67 | try: |
| 68 | 68 | parser, mime = utils.get_file_parser(filepath) | |
| 69 | if parser is None: | 69 | except ValueError: |
| 70 | flash('The type %s is not supported' % mime) | 70 | flash('The filetype is not supported') |
| 71 | current_app.logger.error('Unsupported type %s', mime) | 71 | current_app.logger.error('Unsupported filetype',) |
| 72 | return redirect(url_for('routes.upload_file')) | 72 | return redirect(url_for('routes.upload_file')) |
| 73 | 73 | ||
| 74 | try: | 74 | try: |
