ui: replace a trivial file read with the `util` function
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 17 Dec 2024 01:39:33 -0500
changeset 52581 cc918741a22a
parent 52580 f4d1f0713b49
child 52582 1b9b6b4aa929
ui: replace a trivial file read with the `util` function
mercurial/ui.py
--- 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)