If we get an exception from cfg.read(), we would not close the file
before this patch. This patch uses a context manager to make sure we
close it.
Details
Details
- Reviewers
 pulkit - Group Reviewers
 hg-reviewers - Commits
 - rHGc41ed5d4f770: config: close file even if we fail to read it
 
Diff Detail
Diff Detail
- Repository
 - rHG Mercurial
 - Lint
 Automatic diff as part of commit; lint not applicable. - Unit
 Automatic diff as part of commit; unit tests not applicable.