mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-05-03 05:49:14 -05:00
Remove tarfile_open (tarfile open in 2.7+)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user