Remove tarfile_open (tarfile open in 2.7+)

This commit is contained in:
Anthony Sottile 2016-08-31 16:24:30 -07:00
parent 0a810249e3
commit 57cc50e0ad
4 changed files with 8 additions and 19 deletions

View file

@ -3,12 +3,12 @@ from __future__ import print_function
from __future__ import unicode_literals
import os.path
import tarfile
from pre_commit import five
from pre_commit.util import cmd_output
from pre_commit.util import cwd
from pre_commit.util import rmtree
from pre_commit.util import tarfile_open
from pre_commit.util import tmpdir
@ -53,7 +53,7 @@ def make_archive(name, repo, ref, destdir):
# runtime
rmtree(os.path.join(tempdir, '.git'))
with tarfile_open(five.n(output_path), 'w|gz') as tf:
with tarfile.open(five.n(output_path), 'w|gz') as tf:
tf.add(tempdir, name)
return output_path