diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-04 11:31:44 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-07 12:00:23 +0200 |
| commit | 13338a6314a6c7120b29a22d8256deb52465aa8f (patch) | |
| tree | 3c8e9bb6ce8ebb732d0ded2cdc92012caf64b956 /django/utils/archive.py | |
| parent | 67646dc28d6fc7b4032f1f5a18a5347e81755638 (diff) | |
[py3] Minor cleanup in django.utils.archive.
Diffstat (limited to 'django/utils/archive.py')
| -rw-r--r-- | django/utils/archive.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/django/utils/archive.py b/django/utils/archive.py index 6b5d73290f..829b55dd28 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -23,7 +23,6 @@ THE SOFTWARE. """ import os import shutil -import sys import tarfile import zipfile @@ -147,11 +146,11 @@ class TarArchive(BaseArchive): else: try: extracted = self._archive.extractfile(member) - except (KeyError, AttributeError): + except (KeyError, AttributeError) as exc: # Some corrupt tar files seem to produce this # (specifically bad symlinks) - print ("In the tar file %s the member %s is invalid: %s" % - (name, member.name, sys.exc_info()[1])) + print("In the tar file %s the member %s is invalid: %s" % + (name, member.name, exc)) else: dirname = os.path.dirname(filename) if dirname and not os.path.exists(dirname): |
