python: Migrate open statements to use with.

This is low priority, but it's nice to be consistently using the best
practice pattern.

Fixes: #12419.
This commit is contained in:
Wyatt Hoodes
2019-07-14 09:37:08 -10:00
committed by Tim Abbott
parent e97179fc87
commit e331a758c3
30 changed files with 101 additions and 81 deletions

View File

@@ -56,7 +56,8 @@ def get_provisioning_status():
# their own dependencies and not running provision.
return True, None
version = open(version_file).read().strip()
with open(version_file, 'r') as f:
version = f.read().strip()
# Normal path for people that provision--we're all good!
if version == PROVISION_VERSION: