Mercurial > hg
diff mercurial/scmwindows.py @ 43910:c41ed5d4f770
config: close file even if we fail to read it
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.
Differential Revision: https://phab.mercurial-scm.org/D7626
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 11 Dec 2019 15:06:09 -0800 |
parents | 29adf0a087a1 |
children | 9a3ac902d597 |