changeset 13400 | 14f3795a5ed7 |
parent 13198 | e71b2aa74ce3 |
child 13838 | c5709dfa5c1e |
--- a/hgext/patchbomb.py Fri Feb 11 22:24:10 2011 +0800 +++ b/hgext/patchbomb.py Fri Dec 24 15:23:01 2010 +0100 @@ -261,7 +261,10 @@ tmpfn = os.path.join(tmpdir, 'bundle') try: commands.bundle(ui, repo, tmpfn, dest, **opts) - return open(tmpfn, 'rb').read() + fp = open(tmpfn, 'rb') + data = fp.read() + fp.close() + return data finally: try: os.unlink(tmpfn)