Added with statement to close file before returning

Description

Removed 3 ResourceWarnings from #3521, adding a "with" statement to close the input file after returning, following [PEP 343](https://www.python.org/dev/peps/pep-0343/)

Tests pass without warnings in local.

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Daniel Francis

Repo

edx/edx-platform

Customer

None

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 & 2)

Developer Experiences

Platform Map Area (Levels 3 & 4)

None

Blended Hour Utilization Percentage

None

Priority

Unset
Configure