# HG changeset patch # User Bryan O'Sullivan # Date 1452643038 28800 # Node ID ddfb8887212d1e50cf8b101f8a68c0a3beb1cb90 # Parent 198f78a52a2f87adf3d2b8e4d751521b77229d3d patchbomb: replace file I/O with util.readfile diff -r 198f78a52a2f -r ddfb8887212d hgext/patchbomb.py --- 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)