changeset 27767:ddfb8887212d

patchbomb: replace file I/O with util.readfile
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 12 Jan 2016 15:57:18 -0800
parents 198f78a52a2f
children 5ef99738a562
files hgext/patchbomb.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun Jan 10 18:15:39 2016 -0500
+++ b/hgext/patchbomb.py	Tue Jan 12 15:57:18 2016 -0800
@@ -235,10 +235,7 @@
         opts['type'] = btype
     try:
         commands.bundle(ui, repo, tmpfn, dest, **opts)
-        fp = open(tmpfn, 'rb')
-        data = fp.read()
-        fp.close()
-        return data
+        return util.readfile(tmpfn)
     finally:
         try:
             os.unlink(tmpfn)