Fixing an error on Travis that wasn't showing up locally - can't close a file that never opened.

This commit is contained in:
Dan Funk 2020-03-05 16:55:46 -05:00
parent 906bacff6a
commit bb3f0dc128
1 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ class ExampleDataLoader:
"""Assumes that a directory exists in static/bpmn with the same name as the given id. """Assumes that a directory exists in static/bpmn with the same name as the given id.
further assumes that the [id].bpmn is the primary file for the workflow. further assumes that the [id].bpmn is the primary file for the workflow.
returns an array of data models to be added to the database.""" returns an array of data models to be added to the database."""
global file
file_service = FileService() file_service = FileService()
spec = WorkflowSpecModel(id=id, spec = WorkflowSpecModel(id=id,
@ -103,5 +104,6 @@ class ExampleDataLoader:
# Ignore sub directories # Ignore sub directories
pass pass
finally: finally:
if file:
file.close() file.close()
return spec return spec