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

@ -8,7 +8,6 @@ import os.path
import shutil
import stat
import subprocess
import tarfile
import tempfile
import pkg_resources
@ -82,16 +81,6 @@ def no_git_env():
)
@contextlib.contextmanager
def tarfile_open(*args, **kwargs):
"""Compatibility layer because python2.6"""
tf = tarfile.open(*args, **kwargs)
try:
yield tf
finally:
tf.close()
@contextlib.contextmanager
def tmpdir():
"""Contextmanager to create a temporary directory. It will be cleaned up