Fixing an error on Travis that wasn't showing up locally - can't close a file that never opened.
This commit is contained in:
parent
906bacff6a
commit
bb3f0dc128
|
@ -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:
|
||||||
file.close()
|
if file:
|
||||||
|
file.close()
|
||||||
return spec
|
return spec
|
||||||
|
|
Loading…
Reference in New Issue