Skip to content

Commit

Permalink
frontend/upload: Catch exceptions in analyse_flight() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed May 11, 2015
1 parent 943e30e commit aa2ef55
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion skylines/frontend/views/upload.py
Expand Up @@ -237,7 +237,14 @@ def index_post(form):

fp = flight_path(flight.igc_file, add_elevation=True, max_points=None)

if not analyse_flight(flight, fp=fp):
analyzed = False
try:
analyse_flight(flight, fp=fp)
analyzed = True
except:
current_app.logger.exception('analyse_flight() raised an exception')

if not analyzed:
files.delete_file(filename)
flights.append((name, None, UploadStatus.PARSER_ERROR, str(prefix), None, None, None, None))
continue
Expand Down

0 comments on commit aa2ef55

Please sign in to comment.