settings: close local settings file (#61980)

This commit is contained in:
Nicolas Roche 2022-02-18 17:48:03 +01:00
parent 4f93ac5490
commit b2de21ed47
1 changed files with 2 additions and 1 deletions

View File

@ -50,4 +50,5 @@ local_settings_file = os.environ.get(
'EOBUILDER_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
)
if os.path.exists(local_settings_file):
exec(open(local_settings_file).read())
with open(local_settings_file) as f:
exec(f.read())