changeset 52607:cc918741a22a

ui: replace a trivial file read with the `util` function
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 17 Dec 2024 01:39:33 -0500
parents f4d1f0713b49
children 1b9b6b4aa929
files mercurial/ui.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Tue Dec 17 01:35:52 2024 -0500
+++ b/mercurial/ui.py	Tue Dec 17 01:39:33 2024 -0500
@@ -2007,8 +2007,7 @@
                 blockedtag=b'editor',
             )
 
-            with open(name, 'rb') as f:
-                t = util.fromnativeeol(f.read())
+            t = util.fromnativeeol(util.readfile(name))
         finally:
             os.unlink(name)