Klaus Demo ~jonashaag/klaus / 1a74868
Added contextlib.closing to tar_stream for python 2.6 compatiblity Dana Runge 7 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
11 import stat
22 import tarfile
33 from io import BytesIO
4 from contextlib import closing
45
56
67 class ListBytesIO(object):
4950 time of all files in the resulting .tar.gz archive.
5051 """
5152 buf = BytesIO()
52 with tarfile.open(None, "w:%s" % format, buf) as tar:
53 with closing(tarfile.open(None, "w:%s" % format, buf)) as tar:
5354 for entry_abspath, entry in walk_tree(repo, tree):
5455 try:
5556 blob = repo[entry.sha]