# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1537929978 14400
#      Tue Sep 25 22:46:18 2018 -0400
# Node ID 28626957395a97e61609ff0a405c40665c019f36
# Parent  85a474adaf26d07c408a956c7e5d7d7c0eff072a
convert: fix a file descriptor leak

test-check-code flagged this after I changed this line for something unrelated.

diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py
--- a/hgext/convert/gnuarch.py
+++ b/hgext/convert/gnuarch.py
@@ -18,6 +18,7 @@
     encoding,
     error,
     pycompat,
+    util,
 )
 from mercurial.utils import (
     dateutil,
@@ -228,7 +229,7 @@
             else:
                 mode = ''
         else:
-            data = open(os.path.join(self.tmppath, name), 'rb').read()
+            data = util.readfile(os.path.join(self.tmppath, name))
             mode = (mode & 0o111) and 'x' or ''
         return data, mode