mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove tarfile_open (tarfile open in 2.7+)
This commit is contained in:
parent
0a810249e3
commit
57cc50e0ad
4 changed files with 8 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue