Skip to content

Commit

Permalink
Fix AttributeError Python 2.6
Browse files Browse the repository at this point in the history
Closes #22, again.
  • Loading branch information
mgedmin committed Jan 30, 2014
1 parent 46b4a98 commit 06eb5f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import tarfile
import tempfile
import zipfile
from contextlib import contextmanager
from contextlib import contextmanager, closing

try:
import ConfigParser
Expand Down Expand Up @@ -213,7 +213,7 @@ def get_archive_file_list(archive_filename):
with zipfile.ZipFile(archive_filename) as zf:
return add_directories(zf.namelist())
elif archive_filename.endswith(('.tar.gz', '.tar.bz2', '.tar')):
with tarfile.open(archive_filename) as tf:
with closing(tarfile.open(archive_filename)) as tf:
return tf.getnames()
else:
ext = os.path.splitext(archive_filename)[-1]
Expand Down

0 comments on commit 06eb5f3

Please sign in to comment.